diff --git a/src/db/migrations/0000_shocking_gladiator.sql b/src/db/migrations/0000_bouncy_thor_girl.sql similarity index 52% rename from src/db/migrations/0000_shocking_gladiator.sql rename to src/db/migrations/0000_bouncy_thor_girl.sql index 70f3f1a..7168128 100644 --- a/src/db/migrations/0000_shocking_gladiator.sql +++ b/src/db/migrations/0000_bouncy_thor_girl.sql @@ -1,30 +1,40 @@ CREATE TABLE IF NOT EXISTS "guildApps" ( "id" serial PRIMARY KEY NOT NULL, "userID" text NOT NULL, - "uuid" text NOT NULL + "uuid" text NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp DEFAULT now() NOT NULL ); --> statement-breakpoint CREATE TABLE IF NOT EXISTS "settings" ( "id" serial PRIMARY KEY NOT NULL, "name" text NOT NULL, - "value" text NOT NULL + "value" text NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp DEFAULT now() NOT NULL ); --> statement-breakpoint CREATE TABLE IF NOT EXISTS "staffApps" ( "id" serial PRIMARY KEY NOT NULL, "userID" text NOT NULL, - "uuid" text NOT NULL + "uuid" text NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp DEFAULT now() NOT NULL ); --> statement-breakpoint CREATE TABLE IF NOT EXISTS "verifies" ( "id" serial PRIMARY KEY NOT NULL, "userID" text NOT NULL, - "uuid" text NOT NULL + "uuid" text NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp DEFAULT now() NOT NULL ); --> statement-breakpoint CREATE TABLE IF NOT EXISTS "waitingLists" ( "id" serial PRIMARY KEY NOT NULL, "userID" text NOT NULL, "uuid" text NOT NULL, - "timestamp" bigint NOT NULL + "timestamp" bigint NOT NULL, + "createdAt" timestamp DEFAULT now() NOT NULL, + "updatedAt" timestamp DEFAULT now() NOT NULL ); diff --git a/src/db/migrations/meta/0000_snapshot.json b/src/db/migrations/meta/0000_snapshot.json index 4d550e2..8bfbcac 100644 --- a/src/db/migrations/meta/0000_snapshot.json +++ b/src/db/migrations/meta/0000_snapshot.json @@ -1,5 +1,5 @@ { - "id": "fc9135a5-9614-429b-880c-ac41f9192a8e", + "id": "6343d646-6e68-4bcd-ae1e-5cecb4569268", "prevId": "00000000-0000-0000-0000-000000000000", "version": "7", "dialect": "postgresql", @@ -25,6 +25,20 @@ "type": "text", "primaryKey": false, "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" } }, "indexes": {}, @@ -53,6 +67,20 @@ "type": "text", "primaryKey": false, "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" } }, "indexes": {}, @@ -81,6 +109,20 @@ "type": "text", "primaryKey": false, "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" } }, "indexes": {}, @@ -109,6 +151,20 @@ "type": "text", "primaryKey": false, "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" } }, "indexes": {}, @@ -143,6 +199,20 @@ "type": "bigint", "primaryKey": false, "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" } }, "indexes": {}, diff --git a/src/db/migrations/meta/_journal.json b/src/db/migrations/meta/_journal.json index 8ef530d..a1d64b8 100644 --- a/src/db/migrations/meta/_journal.json +++ b/src/db/migrations/meta/_journal.json @@ -5,8 +5,8 @@ { "idx": 0, "version": "7", - "when": 1727898828198, - "tag": "0000_shocking_gladiator", + "when": 1727906753913, + "tag": "0000_bouncy_thor_girl", "breakpoints": true } ]