From badd9263f465a8e45baeee23fe20c7f6e93829f5 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Thu, 25 Apr 2024 13:14:37 +0530 Subject: [PATCH] [server] Add ip column --- server/migrations/84_add_cast_column.down.sql | 1 + server/migrations/84_add_cast_column.up.sql | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 server/migrations/84_add_cast_column.down.sql create mode 100644 server/migrations/84_add_cast_column.up.sql diff --git a/server/migrations/84_add_cast_column.down.sql b/server/migrations/84_add_cast_column.down.sql new file mode 100644 index 0000000000..c08fed94e6 --- /dev/null +++ b/server/migrations/84_add_cast_column.down.sql @@ -0,0 +1 @@ +ALTER TABLE casting DROP COLUMN IF EXISTS ip; \ No newline at end of file diff --git a/server/migrations/84_add_cast_column.up.sql b/server/migrations/84_add_cast_column.up.sql new file mode 100644 index 0000000000..828c2e57c2 --- /dev/null +++ b/server/migrations/84_add_cast_column.up.sql @@ -0,0 +1,5 @@ +--- Delete all rows from casting table and add a non-nullable column called ip +BEGIN; +DELETE FROM casting; +ALTER TABLE casting ADD COLUMN ip text NOT NULL; +COMMIT;