Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[server] Update constraints to allow for BF 2024

vishnukvmd949c3c3c735c
diff --git a/server/migrations/92_update_storage_bonus_check.down.sql b/server/migrations/92_update_storage_bonus_check.down.sql
new file mode 100644
index 0000000000..9015d76158
--- /dev/null
+++ b/server/migrations/92_update_storage_bonus_check.down.sql
@@ -0,0 +1,6 @@
+ALTER TABLE storage_bonus
+ DROP CONSTRAINT IF EXISTS storage_bonus_type_check;
+
+ALTER TABLE storage_bonus
+ ADD CONSTRAINT storage_bonus_type_check
+ CHECK (type IN ('REFERRAL', 'SIGN_UP', 'ANNIVERSARY', 'ADD_ON_BF_2023', 'ADD_ON_SUPPORT'));
diff --git a/server/migrations/92_update_storage_bonus_check.up.sql b/server/migrations/92_update_storage_bonus_check.up.sql
new file mode 100644
index 0000000000..ea74198ccc
--- /dev/null
+++ b/server/migrations/92_update_storage_bonus_check.up.sql
@@ -0,0 +1,6 @@
+ALTER TABLE storage_bonus
+ DROP CONSTRAINT IF EXISTS storage_bonus_type_check;
+
+ALTER TABLE storage_bonus
+ ADD CONSTRAINT storage_bonus_type_check
+ CHECK (type IN ('REFERRAL', 'SIGN_UP', 'ANNIVERSARY', 'ADD_ON_BF_2023', 'ADD_ON_SUPPORT', 'ADD_ON_BF_2024'));