Skip to content

Commit

Permalink
feat: run migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi committed Jun 25, 2024
1 parent 145e391 commit ff3c708
Show file tree
Hide file tree
Showing 10 changed files with 1,203 additions and 323 deletions.
15 changes: 15 additions & 0 deletions drizzle/0005_medical_gorilla_man.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE TABLE IF NOT EXISTS "auto_play" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"guild_id" uuid,
"client_id" text,
"activated_by" text,
"state" boolean DEFAULT false,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp NOT NULL
);
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "auto_play" ADD CONSTRAINT "auto_play_guild_id_guild_id_fk" FOREIGN KEY ("guild_id") REFERENCES "public"."guild"("id") ON DELETE no action ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
2 changes: 1 addition & 1 deletion drizzle/meta/0000_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "6",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.activation_key": {
Expand Down
2 changes: 1 addition & 1 deletion drizzle/meta/0001_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "6",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.activation_key": {
Expand Down
2 changes: 1 addition & 1 deletion drizzle/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "6",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.activation_key": {
Expand Down
70 changes: 35 additions & 35 deletions drizzle/meta/0003_snapshot.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"id": "fa8827ba-74f8-423b-a0e9-684aff21e9a4",
"prevId": "c09979e5-5ec9-4ce3-9a82-88d8504377d5",
"version": "6",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.activation_key": {
Expand Down Expand Up @@ -84,28 +82,28 @@
"activation_key_guild_id_guild_id_fk": {
"name": "activation_key_guild_id_guild_id_fk",
"tableFrom": "activation_key",
"tableTo": "guild",
"columnsFrom": [
"guild_id"
],
"tableTo": "guild",
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
"onUpdate": "no action",
"onDelete": "no action"
},
"activation_key_user_id_user_id_fk": {
"name": "activation_key_user_id_user_id_fk",
"tableFrom": "activation_key",
"tableTo": "user",
"columnsFrom": [
"user_id"
],
"tableTo": "user",
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
Expand Down Expand Up @@ -166,15 +164,15 @@
"crossfade_guild_id_guild_id_fk": {
"name": "crossfade_guild_id_guild_id_fk",
"tableFrom": "crossfade",
"tableTo": "guild",
"columnsFrom": [
"guild_id"
],
"tableTo": "guild",
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
Expand Down Expand Up @@ -249,15 +247,15 @@
"dj_guild_id_guild_id_fk": {
"name": "dj_guild_id_guild_id_fk",
"tableFrom": "dj",
"tableTo": "guild",
"columnsFrom": [
"guild_id"
],
"tableTo": "guild",
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
Expand Down Expand Up @@ -318,15 +316,15 @@
"default_volume_guild_id_guild_id_fk": {
"name": "default_volume_guild_id_guild_id_fk",
"tableFrom": "default_volume",
"tableTo": "guild",
"columnsFrom": [
"guild_id"
],
"tableTo": "guild",
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
Expand Down Expand Up @@ -435,15 +433,15 @@
"stay_in_vc_guild_id_guild_id_fk": {
"name": "stay_in_vc_guild_id_guild_id_fk",
"tableFrom": "stay_in_vc",
"tableTo": "guild",
"columnsFrom": [
"guild_id"
],
"tableTo": "guild",
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
Expand Down Expand Up @@ -532,17 +530,17 @@
"uniqueConstraints": {
"user_discord_id_unique": {
"name": "user_discord_id_unique",
"nullsNotDistinct": false,
"columns": [
"discord_id"
]
],
"nullsNotDistinct": false
},
"user_patreon_id_unique": {
"name": "user_patreon_id_unique",
"nullsNotDistinct": false,
"columns": [
"patreon_id"
]
],
"nullsNotDistinct": false
}
}
},
Expand Down Expand Up @@ -610,10 +608,10 @@
"uniqueConstraints": {
"playlist_external_id_unique": {
"name": "playlist_external_id_unique",
"nullsNotDistinct": false,
"columns": [
"external_id"
]
],
"nullsNotDistinct": false
}
}
},
Expand Down Expand Up @@ -671,25 +669,25 @@
"playlist_track_playlist_id_playlist_id_fk": {
"name": "playlist_track_playlist_id_playlist_id_fk",
"tableFrom": "playlist_track",
"tableTo": "playlist",
"columnsFrom": [
"playlist_id"
],
"tableTo": "playlist",
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
"onUpdate": "no action",
"onDelete": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"playlist_track_external_id_unique": {
"name": "playlist_track_external_id_unique",
"nullsNotDistinct": false,
"columns": [
"external_id"
]
],
"nullsNotDistinct": false
}
}
}
Expand Down Expand Up @@ -717,8 +715,10 @@
},
"schemas": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
"tables": {},
"columns": {}
},
"id": "fa8827ba-74f8-423b-a0e9-684aff21e9a4",
"prevId": "c09979e5-5ec9-4ce3-9a82-88d8504377d5"
}
Loading

0 comments on commit ff3c708

Please sign in to comment.