change table column name
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
DROP TABLE IF EXISTS loan_order_required_docs;
|
||||
DROP TABLE IF EXISTS loan_types;
|
||||
DROP TABLE IF EXISTS reasons_cards;
|
||||
DROP TABLE IF EXISTS payment_cards;
|
||||
DROP TABLE IF EXISTS card_states;
|
||||
DROP TABLE IF EXISTS card_types;
|
||||
DROP TABLE IF EXISTS branches;
|
||||
DROP TABLE IF EXISTS provinces;
|
||||
DROP TABLE IF EXISTS users;
|
||||
|
||||
@@ -54,21 +54,22 @@ CREATE TABLE IF NOT EXISTS branches (
|
||||
"created_at" TIMESTAMP DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC') NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS payment_cards (
|
||||
CREATE TABLE IF NOT EXISTS card_types (
|
||||
id bigserial PRIMARY KEY,
|
||||
price numeric(12, 2) NOT NULL DEFAULT 0,
|
||||
title json NOT NULL DEFAULT '{}'::json,
|
||||
content json NOT NULL DEFAULT '{}'::json,
|
||||
name json NOT NULL DEFAULT '{}'::json,
|
||||
price character varying(255) NOT NULL DEFAULT '',
|
||||
notes character varying(255) NOT NULL DEFAULT '',
|
||||
active boolean NOT NULL DEFAULT true,
|
||||
"updated_at" TIMESTAMP DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC') NOT NULL,
|
||||
"created_at" TIMESTAMP DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC') NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS reasons_cards (
|
||||
CREATE TABLE IF NOT EXISTS card_states (
|
||||
id bigserial PRIMARY KEY,
|
||||
title json NOT NULL DEFAULT '{}'::json,
|
||||
price numeric(12, 2) NOT NULL DEFAULT 0,
|
||||
content json NOT NULL DEFAULT '{}'::json,
|
||||
name json NOT NULL DEFAULT '{}'::json,
|
||||
price character varying(255) NOT NULL DEFAULT '',
|
||||
notes character varying(255) NOT NULL DEFAULT '',
|
||||
active boolean NOT NULL DEFAULT true,
|
||||
created_at TIMESTAMP DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC') NOT NULL,
|
||||
updated_at TIMESTAMP DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC') NOT NULL
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ALTER TABLE loan_order_required_docs RENAME COLUMN active TO status;
|
||||
ALTER TABLE payment_cards RENAME COLUMN active TO status;
|
||||
ALTER TABLE card_types RENAME COLUMN active TO status;
|
||||
ALTER TABLE provinces RENAME COLUMN active TO status;
|
||||
ALTER TABLE users RENAME COLUMN active TO status;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ALTER TABLE users RENAME COLUMN status TO active;
|
||||
ALTER TABLE provinces RENAME COLUMN status TO active;
|
||||
ALTER TABLE payment_cards RENAME COLUMN status TO active;
|
||||
ALTER TABLE card_types RENAME COLUMN status TO active;
|
||||
ALTER TABLE loan_order_required_docs RENAME COLUMN status TO active;
|
||||
|
||||
Reference in New Issue
Block a user