diff --git a/migrations/2025-04-07-124248_extend_user_table/down.sql b/migrations/2025-04-07-124248_extend_user_table/down.sql new file mode 100644 index 0000000..10636f0 --- /dev/null +++ b/migrations/2025-04-07-124248_extend_user_table/down.sql @@ -0,0 +1,5 @@ +ALTER TABLE users +DROP COLUMN first_name, +DROP COLUMN last_name, +DROP COLUMN username, +DROP COLUMN language_code; diff --git a/migrations/2025-04-07-124248_extend_user_table/up.sql b/migrations/2025-04-07-124248_extend_user_table/up.sql new file mode 100644 index 0000000..b2d3353 --- /dev/null +++ b/migrations/2025-04-07-124248_extend_user_table/up.sql @@ -0,0 +1,5 @@ +ALTER TABLE users +ADD COLUMN first_name VARCHAR(255), +ADD COLUMN last_name VARCHAR(255), +ADD COLUMN username VARCHAR(255), +ADD COLUMN language_code VARCHAR(10); diff --git a/migrations/2025-04-07-125633_non_optional_firstname/down.sql b/migrations/2025-04-07-125633_non_optional_firstname/down.sql new file mode 100644 index 0000000..38e94eb --- /dev/null +++ b/migrations/2025-04-07-125633_non_optional_firstname/down.sql @@ -0,0 +1,6 @@ +-- This file should undo anything in `up.sql` + + + +ALTER TABLE "users" ALTER COLUMN "first_name" DROP NOT NULL; + diff --git a/migrations/2025-04-07-125633_non_optional_firstname/up.sql b/migrations/2025-04-07-125633_non_optional_firstname/up.sql new file mode 100644 index 0000000..76ebd78 --- /dev/null +++ b/migrations/2025-04-07-125633_non_optional_firstname/up.sql @@ -0,0 +1,6 @@ +-- Your SQL goes here + + + +ALTER TABLE "users" ALTER COLUMN "first_name" SET NOT NULL; +