Skip to content

Commit 2198cb5

Browse files
authored
fix(docs): document how to copy migration history to new project (supabase#20508)
fix: document how to copy migration history to new project
1 parent 2c59176 commit 2198cb5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/docs/pages/guides/platform/migrating-and-upgrading-projects.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ Note that this direct connection string to the database uses IPv6. If your netwo
153153
supabase db dump --db-url "$OLD_DB_URL" -f roles.sql --role-only
154154
supabase db dump --db-url "$OLD_DB_URL" -f schema.sql
155155
supabase db dump --db-url "$OLD_DB_URL" -f data.sql --use-copy --data-only
156+
supabase db dump --db-url "$OLD_DB_URL" -f history.sql --use-copy --data-only --schema supabase_migrations
156157
```
157158

158159
### Restore to your new project
@@ -186,6 +187,7 @@ psql \
186187
--file schema.sql \
187188
--command 'SET session_replication_role = replica' \
188189
--file data.sql \
190+
--file history.sql \
189191
--dbname "$NEW_DB_URL"
190192
```
191193

0 commit comments

Comments
 (0)