@@ -89,9 +89,11 @@ VACUUM
8989
9090## Suggested File Layout
9191
92- SuperStack doesn't require any file names or layout, that's up to you.
92+ SuperStack doesn’t enforce any particular migration file names or layout —
93+ you’re free to organise them however you like.
9394
94- But here's one you might use while developing (pre-production):
95+ Here’s a simple structure you might adopt during development (before
96+ production):
9597
9698```
979901-extensions.sql
@@ -101,17 +103,31 @@ But here's one you might use while developing (pre-production):
10110305-grants.sql
102104```
103105
104- During development, make changes and:
106+ While developing, you can reset and rebuild the database from scratch as often
107+ as needed:
105108
106109``` sh
107110docker compose down --volumes; docker compose up -d
108111```
109112
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 ` ).
113+ Once you’ve deployed to production (or another persistent environment), avoid
114+ recreating the database. Instead:
115+
116+ - Add new migrations starting from ` 06-... ` onwards.
117+ - Apply them with:
118+
119+ ``` sh
120+ bin/postgres migrate
121+ ```
122+
123+ In other environments where ` bin/postgres ` isn't available:
124+
125+ ``` sh
126+ docker compose exec postgres migrate
127+ ```
128+
129+ This approach keeps early development simple while providing a clear, ordered
130+ history once the database must be preserved.
115131
116132## 🔄 Nuke Everything
117133
0 commit comments