initial commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package sqaffold
|
||||
|
||||
import "code.aneur.in/go/version"
|
||||
|
||||
func (s *Scaffold) migration() version.Migration {
|
||||
return version.Migration{
|
||||
"0.1.0": version.Patch{
|
||||
Up: func() error {
|
||||
_, err := s.Exec(`
|
||||
create table sqaffold_apps (
|
||||
name text not null,
|
||||
version text,
|
||||
constraint config__unq__name unique (name) on conflict replace
|
||||
)`)
|
||||
|
||||
return err
|
||||
},
|
||||
|
||||
Down: func() error {
|
||||
_, err := s.Exec("drop table sqaffold_apps")
|
||||
return err
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user