zerobyte/app/drizzle/0027_careful_cammi.sql
Nico ae5233d9fb
refactor: tag snapshots with schedule short_id instead of db id (#248)
* refactor: tag snapshots with schedule short_id instead of db id

* chore: formatting issues
2025-12-28 11:42:25 +01:00

3 lines
310 B
SQL

ALTER TABLE `backup_schedules_table` ADD `short_id` text;--> statement-breakpoint
UPDATE `backup_schedules_table` SET `short_id` = lower(hex(randomblob(4))) WHERE `short_id` IS NULL;--> statement-breakpoint
CREATE UNIQUE INDEX `backup_schedules_table_short_id_unique` ON `backup_schedules_table` (`short_id`);