Commit 453701c
Added create-migration command line instruction (#943)
* Added create-migration command line instruction
This update adds a command line interface to create migrations directly with sqlpage, and have it manage the timestamps and uniqueness of migration names.
* Update sqlpage/migrations/README.md
Co-authored-by: Ophir LOJKINE <[email protected]>
* Update sqlpage/migrations/README.md
Co-authored-by: Ophir LOJKINE <[email protected]>
* Updated with changes for config directory, migration output
Now respects the configuration_directory environment variable.
It also outputs the path of the new migration created when it is created, and takes care to display that path relative to the current working directory.
Lastly, the execution of create-migration command was moved above the rest of the initialization, so that creating a new migration does not run existing migrations. This allows you to create multiple migrations before you run sqlpage normally again to execute them.
---------
Co-authored-by: Ophir LOJKINE <[email protected]>1 parent 7ccf735 commit 453701c
3 files changed
+91
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
25 | 39 | | |
26 | 40 | | |
27 | 41 | | |
| |||
686 | 700 | | |
687 | 701 | | |
688 | 702 | | |
| 703 | + | |
689 | 704 | | |
690 | 705 | | |
691 | 706 | | |
| |||
726 | 741 | | |
727 | 742 | | |
728 | 743 | | |
| 744 | + | |
729 | 745 | | |
730 | 746 | | |
731 | 747 | | |
| |||
744 | 760 | | |
745 | 761 | | |
746 | 762 | | |
| 763 | + | |
747 | 764 | | |
748 | 765 | | |
749 | 766 | | |
| |||
773 | 790 | | |
774 | 791 | | |
775 | 792 | | |
| 793 | + | |
776 | 794 | | |
777 | 795 | | |
778 | 796 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
18 | 34 | | |
19 | 35 | | |
20 | 36 | | |
| 37 | + | |
21 | 38 | | |
22 | 39 | | |
23 | 40 | | |
| |||
41 | 58 | | |
42 | 59 | | |
43 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
0 commit comments