Compare commits
2 Commits
d5899d3a75
...
0db1ffd667
| Author | SHA1 | Date |
|---|---|---|
|
|
0db1ffd667 | |
|
|
b6ff046116 |
|
|
@ -0,0 +1 @@
|
||||||
|
alias sqitchl='SQITCH_PASSWORD=$POSTGRES_PASSWORD sqitch -u $POSTGRES_USER -p $POSTGRES_PORT -h 127.0.0.1'
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
tmp/
|
||||||
# ---> Python
|
# ---> Python
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgres
|
||||||
|
volumes:
|
||||||
|
- ./tmp/${COMPOSE_PROJECT_NAME}/db:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=${POSTGRES_DB}
|
||||||
|
- POSTGRES_USER=${POSTGRES_USER}
|
||||||
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
ports:
|
||||||
|
- "${POSTGRES_PORT}:5432"
|
||||||
|
|
@ -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