migrations
This commit is contained in:
parent
c55a9e8b98
commit
334c09df7c
@ -1,6 +1,6 @@
|
||||
export PORT=8080
|
||||
|
||||
export DB_HOST=postgres
|
||||
export DB_HOST=localhost
|
||||
export DB_USER=postgres
|
||||
export DB_PASSWORD=password
|
||||
export DB_NAME=db_name
|
||||
|
@ -9,7 +9,7 @@
|
||||
"dev-server": "echo \"starting server\" && npm run dev-ts ./src/server/index.ts",
|
||||
"dev-ts": "nodemon --require 'dotenv/config'",
|
||||
"dev-watch-client": "ts-node ./scripts/watch.ts",
|
||||
"dev-migrate": "source ./.env pg-migrations apply --directory ./src/database/migrations",
|
||||
"dev-migrate": "source ./.env && pg-migrations apply --directory ./src/database/migrations",
|
||||
"prod-migrate": "pg-migrations apply --directory ./src/database/migrations",
|
||||
"prod-build-client": "ts-node ./scripts/build.ts",
|
||||
"prod-docker": "docker compose --profile prod up -d",
|
||||
|
@ -1,4 +1,5 @@
|
||||
CREATE TABLE users (
|
||||
id text,
|
||||
username text
|
||||
name text,
|
||||
password text
|
||||
)
|
8
src/database/migrations/2-second-migration.sql
Normal file
8
src/database/migrations/2-second-migration.sql
Normal file
@ -0,0 +1,8 @@
|
||||
CREATE TABLE games (
|
||||
id text,
|
||||
name text, -- user defined
|
||||
repo_fullname text, -- e.g. "username/reponame"
|
||||
repo_hosttype text, -- "github", "gitea", "gitlab", ...
|
||||
repo_token text, -- an api auth token to read from the repo
|
||||
user_id text
|
||||
)
|
7
src/database/migrations/3-third-migration.sql
Normal file
7
src/database/migrations/3-third-migration.sql
Normal file
@ -0,0 +1,7 @@
|
||||
CREATE TABLE game_instances (
|
||||
id text,
|
||||
game_id text,
|
||||
cart_data text,
|
||||
created_at time,
|
||||
is_official boolean
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user