diff --git a/backend/internal/data/migrations/migrations/20230305065819_add_notifier_types.sql b/backend/internal/data/migrations/migrations/20230305065819_add_notifier_types.sql new file mode 100644 index 0000000..09b1824 --- /dev/null +++ b/backend/internal/data/migrations/migrations/20230305065819_add_notifier_types.sql @@ -0,0 +1,6 @@ +-- create "notifiers" table +CREATE TABLE `notifiers` (`id` uuid NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `name` text NOT NULL, `url` text NOT NULL, `is_active` bool NOT NULL DEFAULT true, `user_id` uuid NOT NULL, PRIMARY KEY (`id`), CONSTRAINT `notifiers_users_notifiers` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE); +-- create index "notifier_user_id" to table: "notifiers" +CREATE INDEX `notifier_user_id` ON `notifiers` (`user_id`); +-- create index "notifier_user_id_is_active" to table: "notifiers" +CREATE INDEX `notifier_user_id_is_active` ON `notifiers` (`user_id`, `is_active`); diff --git a/backend/internal/data/migrations/migrations/atlas.sum b/backend/internal/data/migrations/migrations/atlas.sum index eb05def..d928893 100644 --- a/backend/internal/data/migrations/migrations/atlas.sum +++ b/backend/internal/data/migrations/migrations/atlas.sum @@ -1,4 +1,4 @@ -h1:o94ZiQarQV54hzXXKoOUNL/DvHYieveswCLwJaUMGPo= +h1:ZyM3lKzq56l2l2mr1wjKS6sl7vS1i1gCMEw3aWz6Bjk= 20220929052825_init.sql h1:ZlCqm1wzjDmofeAcSX3jE4h4VcdTNGpRg2eabztDy9Q= 20221001210956_group_invitations.sql h1:YQKJFtE39wFOcRNbZQ/d+ZlHwrcfcsZlcv/pLEYdpjw= 20221009173029_add_user_roles.sql h1:vWmzAfgEWQeGk0Vn70zfVPCcfEZth3E0JcvyKTjpYyU= @@ -10,3 +10,4 @@ h1:o94ZiQarQV54hzXXKoOUNL/DvHYieveswCLwJaUMGPo= 20221205234214_add_maintenance_entries.sql h1:B56VzCuDsed1k3/sYUoKlOkP90DcdLufxFK0qYvoafU= 20221205234812_cascade_delete_roles.sql h1:VIiaImR48nCHF3uFbOYOX1E79Ta5HsUBetGaSAbh9Gk= 20230227024134_add_scheduled_date.sql h1:8qO5OBZ0AzsfYEQOAQQrYIjyhSwM+v1A+/ylLSoiyoc= +20230305065819_add_notifier_types.sql h1:r5xrgCKYQ2o9byBqYeAX1zdp94BLdaxf4vq9OmGHNl0=