added sqitch and first table
This commit is contained in:
parent
b6ff046116
commit
0db1ffd667
|
|
@ -0,0 +1 @@
|
|||
alias sqitchl='SQITCH_PASSWORD=$POSTGRES_PASSWORD sqitch -u $POSTGRES_USER -p $POSTGRES_PORT -h 127.0.0.1'
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
[core]
|
||||
engine = pg
|
||||
top_dir = sqitch
|
||||
# plan_file = sqitch/sqitch.plan
|
||||
# [engine "pg"]
|
||||
# target = db:pg:
|
||||
# registry = sqitch
|
||||
# client = psql
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
-- Deploy leetify-data:data-schema to pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
CREATE SCHEMA data;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
-- Deploy leetify-data:profile-meta to pg
|
||||
-- requires: data-schema
|
||||
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS data.profile_meta (
|
||||
steam64Id TEXT,
|
||||
isCollector BOOL,
|
||||
isLeetifyStaff BOOL,
|
||||
isProPlan BOOL,
|
||||
leetifyUserId TEXT,
|
||||
faceitNickname TEXT
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
-- Revert leetify-data:data-schema from pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP SCHEMA data;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
-- Revert leetify-data:profile-meta from pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
|
||||
DROP TABLE data.profile_meta;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
%syntax-version=1.0.0
|
||||
%project=leetify-data
|
||||
|
||||
data-schema 2024-01-25T03:19:31Z andrei <andrei@tower> # adding schema for data
|
||||
profile-meta [data-schema] 2024-01-25T03:28:08Z andrei <andrei@tower> # add table for profile metadata
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify leetify-data:data-schema on pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
SELECT pg_catalog.has_schema_privilege('data', 'usage');
|
||||
|
||||
ROLLBACK;
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
-- Verify leetify-data:profile-meta on pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
SELECT steam64Id, isCollector, isLeetifyStaff,
|
||||
isProPlan, leetifyUserId, faceitNickname
|
||||
FROM data.profile_meta
|
||||
WHERE FALSE;
|
||||
|
||||
ROLLBACK;
|
||||
Loading…
Reference in New Issue