add lang column to user
This commit is contained in:
parent
757ccac010
commit
fa9dbe0eda
3 changed files with 17 additions and 20 deletions
|
@ -6,6 +6,6 @@ ALTER SCHEMA admin RENAME TO xssbook;
|
|||
-- Migration End;
|
||||
|
||||
-- Set Current Revision
|
||||
UPDATE sys.database_info SET curr_revision = 3 WHERE name = current_database();
|
||||
UPDATE sys.database_info SET curr_revision = 4 WHERE name = current_database();
|
||||
|
||||
COMMIT TRANSACTION;
|
||||
|
|
16
src/db/migrations/0004.sql
Normal file
16
src/db/migrations/0004.sql
Normal file
|
@ -0,0 +1,16 @@
|
|||
BEGIN TRANSACTION;
|
||||
SET search_path = public;
|
||||
|
||||
-- Migration Start
|
||||
CREATE TYPE xssbook.lang_type AS ENUM (
|
||||
'en_US'
|
||||
);
|
||||
|
||||
ALTER TABLE xssbook.user
|
||||
ADD COLUMN lang xssbook.lang_type DEFAULT 'en_US' NOT NULL;
|
||||
-- Migration End;
|
||||
|
||||
-- Set Current Revision
|
||||
UPDATE sys.database_info SET curr_revision = 5 WHERE name = current_database();
|
||||
|
||||
COMMIT TRANSACTION;
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
CREATE FUNCTION FUNCTION _api.root()
|
||||
RETURNS JSON
|
||||
LANGUAGE plpgsql;
|
||||
AS $BODY$
|
||||
DECLARE
|
||||
openapi JSON = $$
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "XSSBook",
|
||||
"description": "XSSBook Api Documentation"
|
||||
}
|
||||
}
|
||||
$$;
|
||||
BEGIN
|
||||
RETURN openapi;
|
||||
END
|
||||
$BODY$;
|
Loading…
Reference in a new issue