From b81c128460a30f6289504311efd8210b4df90e49 Mon Sep 17 00:00:00 2001 From: swaggboi Date: Mon, 22 Aug 2022 11:00:45 -0400 Subject: [PATCH] Add migrations for Remark model --- migrations/5/down.sql | 14 ++++++++++++++ migrations/5/up.sql | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 migrations/5/down.sql create mode 100644 migrations/5/up.sql diff --git a/migrations/5/down.sql b/migrations/5/down.sql new file mode 100644 index 0000000..c08c816 --- /dev/null +++ b/migrations/5/down.sql @@ -0,0 +1,14 @@ + ALTER TABLE remarks +RENAME TO replies; + + ALTER TABLE replies +RENAME remark_id TO reply_id; + + ALTER TABLE replies +RENAME remark_date TO reply_date; + + ALTER TABLE replies +RENAME remark_author TO reply_author; + + ALTER TABLE replies +RENAME remark_body TO reply_body; diff --git a/migrations/5/up.sql b/migrations/5/up.sql new file mode 100644 index 0000000..a75b4ef --- /dev/null +++ b/migrations/5/up.sql @@ -0,0 +1,14 @@ + ALTER TABLE replies +RENAME TO remarks; + + ALTER TABLE remarks +RENAME reply_id TO remark_id; + + ALTER TABLE remarks +RENAME reply_date TO remark_date; + + ALTER TABLE remarks +RENAME reply_author TO remark_author; + + ALTER TABLE remarks +RENAME reply_body TO remark_body;