app: lists on meta tables, schema-qualified SQL, typed columns
- lists read/write real lists.* tables via meta.tables/meta.columns and the SECURITY DEFINER meta functions; typed extra columns in the item forms - old numeric list URLs 308-redirect to the slug - include_recurring is boolean, osu accuracy/pp/rate numeric - raw SQL qualified with the new schemas
This commit is contained in:
@@ -8,11 +8,11 @@ try {
|
||||
await sql.begin(async (tx) => {
|
||||
for (const image of artwork) {
|
||||
const rows =
|
||||
await tx`update tracker_items i set icon=${image.path} from tracker_games g where i.game_id=g.id and g.slug=${image.game} and i.key=${image.key} returning i.id`;
|
||||
await tx`update ref.tracker_items i set icon=${image.path} from ref.tracker_games g where i.game_id=g.id and g.slug=${image.game} and i.key=${image.key} returning i.id`;
|
||||
if (rows.length !== 1) throw new Error(`Unknown artwork target: ${image.game}/${image.key}`);
|
||||
}
|
||||
for (const [source, path] of Object.entries(achievementArt)) {
|
||||
await tx`update tracker_items set icon=${path} where kind='achievement' and icon=${source}`;
|
||||
await tx`update ref.tracker_items set icon=${path} where kind='achievement' and icon=${source}`;
|
||||
}
|
||||
});
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user