feat: allow administrator deletion and remove icon source field

This commit is contained in:
陈煜 committed 2026-10-05 16:44:44 +08:00
1 parent a5f1236d44
commit 2db0c75498
18 files changed
+367 -27

No files matched your search

+1 -2
View File
@@ -26,10 +26,9 @@ async function main() {
name: item.name,
shared: true,
data,
source: item.source,
hash: createHash('sha256').update(data).digest('hex'),
},
update: { data, source: item.source, hash: createHash('sha256').update(data).digest('hex') },
update: { data, hash: createHash('sha256').update(data).digest('hex') },
});
}
console.log(`Shared icon catalog ready: ${sources.length} icons.`);
+11
View File
@@ -74,6 +74,17 @@ async function main() {
'utf8',
),
);
// Verify the icon column removal migration against its former shape too.
await connection.query('ALTER TABLE `Icon` ADD COLUMN `source` VARCHAR(500) NULL');
await connection.query(
fs.readFileSync(
path.join(
__dirname,
'../prisma/migrations/20261005150000_remove_icon_source/migration.sql',
),
'utf8',
),
);
const build = run([require.resolve('typescript/bin/tsc')]);
if (build.status !== 0) {
console.log(build.stdout);