add lang column to user

This commit is contained in:
Murphy 2024-12-20 00:51:30 -05:00
parent 757ccac010
commit fa9dbe0eda
Signed by: freya
GPG key ID: 9FBC6FFD6D2DBF17
3 changed files with 17 additions and 20 deletions

View file

@ -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;

View 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;

View file

@ -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$;