feat: M2 database migration runner with Phinx and initial schema
This commit is contained in:
1 parent
d3e8cf8fae
commit
93d991703c
20 files changed
+2000
-14
No files matched your search
@@ -4,9 +4,11 @@ $Command = if ($args.Count) { $args[0] } else { '' }
|
||||
$Forward = @($args | Select-Object -Skip 1)
|
||||
try {
|
||||
switch ($Command) {
|
||||
{ $_ -in 'migrate', 'seed' } {
|
||||
[Console]::Error.WriteLine("$Command unavailable until M2 (#12); #10 remains open")
|
||||
exit 1
|
||||
'migrate' {
|
||||
$ComposeArgs = @('run', '--rm', '--no-deps', '-T', '--entrypoint', 'sh', 'app', '-c', "vendor/bin/phinx migrate $($Forward -join ' ')")
|
||||
}
|
||||
'seed' {
|
||||
$ComposeArgs = @('run', '--rm', '--no-deps', '-T', '--entrypoint', 'sh', 'app', '-c', "vendor/bin/phinx seed:run $($Forward -join ' ')")
|
||||
}
|
||||
'up' { $ComposeArgs = @('up', '-d', '--build') }
|
||||
'down' {
|
||||
|
||||
Reference in new issue
Block a user