create migrations

This commit is contained in:
Akulij 2025-04-03 02:30:37 +09:00
parent a912cf6233
commit 7ebbb211da
7 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1 @@
DROP TABLE users

View File

@ -0,0 +1,5 @@
CREATE TABLE users (
id SERIAL PRIMARY KEY,
is_admin BOOLEAN NOT NULL DEFAULT FALSE
)

View File

@ -0,0 +1,2 @@
ALTER TABLE users
DROP COLUMN user_id;

View File

@ -0,0 +1,2 @@
ALTER TABLE users
ADD COLUMN user_id BIGINT NOT NULL;

View File

@ -0,0 +1,4 @@
ALTER TABLE users
ALTER COLUMN id TYPE integer;
ALTER TABLE users
ADD COLUMN user_id BIGINT NOT NULL;

View File

@ -0,0 +1,4 @@
ALTER TABLE users
ALTER COLUMN id TYPE BIGINT;
ALTER TABLE users
DROP COLUMN user_id;

View File

@ -0,0 +1,6 @@
<<<<<<< HEAD
=======
ALTER TABLE users
ALTER COLUMN id TYPE BIGINT;
>>>>>>> Snippet