From faa97993ad018303354f17259173e039d3d5fba9 Mon Sep 17 00:00:00 2001 From: bayusamudra5502 <bayusamudra.55.02.com@gmail.com> Date: Tue, 14 Feb 2023 19:09:05 +0700 Subject: [PATCH] fix: updating column name --- .../20230214190624-change-username-to-email.sql | 8 ++++++++ .../staging/20230214190624-change-username-to-email.sql | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 migrations/development/20230214190624-change-username-to-email.sql create mode 100644 migrations/staging/20230214190624-change-username-to-email.sql diff --git a/migrations/development/20230214190624-change-username-to-email.sql b/migrations/development/20230214190624-change-username-to-email.sql new file mode 100644 index 0000000..3aa7a02 --- /dev/null +++ b/migrations/development/20230214190624-change-username-to-email.sql @@ -0,0 +1,8 @@ + +-- +migrate Up +ALTER TABLE public."user" + RENAME username TO email; + +-- +migrate Down +ALTER TABLE public."user" + RENAME email TO username; diff --git a/migrations/staging/20230214190624-change-username-to-email.sql b/migrations/staging/20230214190624-change-username-to-email.sql new file mode 100644 index 0000000..3aa7a02 --- /dev/null +++ b/migrations/staging/20230214190624-change-username-to-email.sql @@ -0,0 +1,8 @@ + +-- +migrate Up +ALTER TABLE public."user" + RENAME username TO email; + +-- +migrate Down +ALTER TABLE public."user" + RENAME email TO username; -- GitLab