File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,32 @@ REINDEX
8787VACUUM
8888```
8989
90+ ## Suggested File Layout
91+
92+ SuperStack doesn't require any file names or layout, that's up to you.
93+
94+ But here's one you might use while developing (pre-production):
95+
96+ ```
97+ 01-extensions.sql
98+ 02-create_auth_schema.sql (if using PostgREST for auth)
99+ 03-create_api_schema.sql
100+ 04-roles.sql
101+ 05-grants.sql
102+ ```
103+
104+ During development, make changes and:
105+
106+ ``` sh
107+ docker compose down --volumes; docker compose up -d
108+ ```
109+
110+ Once the app's reached production (or some other environment), you can no
111+ longer keep recreating the database from scratch. Add smaller migrations from
112+ ` 06- ` onwards, and use ` bin/postgres migrate ` (that's a shortcut you can use
113+ locally, on other environments the ` bin/postgres ` script isn't there so use
114+ ` docker compose exec postgres migrate ` ).
115+
90116## 🔄 Nuke Everything
91117
92118If you want to start fresh, wipe your database and re-run all migrations from
You can’t perform that action at this time.
0 commit comments