summaryrefslogtreecommitdiff
path: root/migrations/20230829205506_create_stead_table.up.sql
diff options
context:
space:
mode:
Diffstat (limited to 'migrations/20230829205506_create_stead_table.up.sql')
-rw-r--r--migrations/20230829205506_create_stead_table.up.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/migrations/20230829205506_create_stead_table.up.sql b/migrations/20230829205506_create_stead_table.up.sql
new file mode 100644
index 0000000..55f3ccc
--- /dev/null
+++ b/migrations/20230829205506_create_stead_table.up.sql
@@ -0,0 +1,12 @@
+CREATE TABLE Stead (
+ id SERIAL PRIMARY KEY,
+ username TEXT NOT NULL UNIQUE,
+ password TEXT NOT NULL,
+ inventory JSONB,
+ ephemeral_statuses TEXT[]
+);
+
+CREATE TABLE stead_plant (
+ stead INTEGER references stead(id),
+ plant INTEGER references plant(id)
+);