diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-08-16 21:14:30 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-08-16 21:15:07 -0400 |
| commit | ef056edf92b678265a4666e1f9405e3b0ce66a42 (patch) | |
| tree | b3766d47ae2898d2a46f108de4e2be0ede6c400b /migrations/2024-08-16-111659_multitenant/down.sql | |
| parent | c5ce454319a7d54d3967c6ea7695543e943a37b2 (diff) | |
repo: overhaul for multitenancy
Diffstat (limited to 'migrations/2024-08-16-111659_multitenant/down.sql')
| -rw-r--r-- | migrations/2024-08-16-111659_multitenant/down.sql | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/migrations/2024-08-16-111659_multitenant/down.sql b/migrations/2024-08-16-111659_multitenant/down.sql new file mode 100644 index 0000000..f0cac09 --- /dev/null +++ b/migrations/2024-08-16-111659_multitenant/down.sql @@ -0,0 +1,12 @@ +ALTER TABLE memes + DROP CONSTRAINT IF EXISTS memes_guild_title_key, + DROP CONSTRAINT IF EXISTS memes_guild_content_image_id_audio_id_key, + DROP CONSTRAINT IF EXISTS memes_guild_metadata_id_key; + +DROP INDEX IF EXISTS memes_guild_title_key, + memes_guild_content_image_id_audio_id_key, + memes_guild_metadata_id_key; + +CREATE UNIQUE INDEX IF NOT EXISTS text_memes_title_key ON memes (title); +CREATE UNIQUE INDEX IF NOT EXISTS text_memes_content_image_id_audio_id_key ON memes (content, image_id, audio_id); +CREATE UNIQUE INDEX IF NOT EXISTS text_memes_metadata_id_key ON memes (metadata_id); |
