You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sqlpage/migrations/README.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,13 @@ that is greater than the previous one.
21
21
Use commands like `ALTER TABLE` to update the schema declaratively instead of modifying the existing `CREATE TABLE`
22
22
statements.
23
23
24
-
If you try to edit an existing migration, SQLPage will not run it again, will detect
24
+
If you try to edit an existing migration, SQLPage will not run it again, it will detect that the migration has already executed. Also, if the migration is different than the one that was executed, SQLPage will throw an error as the database structure must match.
25
+
26
+
## Creating migrations on the command line
27
+
28
+
You can create a migration directly with sqlpage by running the command `sqlpage create-migration [migration_name]`
29
+
30
+
For example if you run `sqlpage create-migration "Example Migration 1"` on the command line, you will find a new file under the `sqlpage/migrations` folder called `[timestamp]_example_migration_1.sql` where timestamp is the current time when you ran the command.
0 commit comments