refactor to db setup for admin-cli
This commit is contained in:
parent
747442799d
commit
5b48288179
2
db/setup-db.sql
Normal file
2
db/setup-db.sql
Normal file
@ -0,0 +1,2 @@
|
||||
DROP DATABASE IF EXISTS bubble;
|
||||
CREATE DATABASE bubble;
|
8
db/setup-user.sql
Normal file
8
db/setup-user.sql
Normal file
@ -0,0 +1,8 @@
|
||||
-- Create the user that we'll use for service data
|
||||
DO $SERVICE_USER_CREATION$
|
||||
BEGIN
|
||||
CREATE ROLE bubble_api;
|
||||
EXCEPTION WHEN duplicate_object THEN RAISE NOTICE '%, skipping', SQLERRM USING ERRCODE = SQLSTATE;
|
||||
END
|
||||
$SERVICE_USER_CREATION$;
|
||||
|
12
db/setup.sql
Normal file
12
db/setup.sql
Normal file
@ -0,0 +1,12 @@
|
||||
CREATE TABLE IF NOT EXISTS users (
|
||||
id INTEGER,
|
||||
name VARCHAR(256),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS invites (
|
||||
id BIGINT,
|
||||
expires INTEGER,
|
||||
PRIMARY KEY (id)
|
||||
);
|
Loading…
Reference in New Issue
Block a user