mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 20:22:26 -05:00
First db migration (#297)
* store first db schema * md linting *screams*
This commit is contained in:
parent
09ef9e639e
commit
aee1932bd4
28 changed files with 1114 additions and 39 deletions
|
|
@ -109,21 +109,6 @@ func (suite *AuthTestSuite) SetupTest() {
|
|||
}
|
||||
|
||||
suite.db = db
|
||||
|
||||
models := []interface{}{
|
||||
>smodel.Client{},
|
||||
>smodel.Token{},
|
||||
>smodel.User{},
|
||||
>smodel.Account{},
|
||||
>smodel.Application{},
|
||||
}
|
||||
|
||||
for _, m := range models {
|
||||
if err := suite.db.CreateTable(context.Background(), m); err != nil {
|
||||
logrus.Panicf("db connection error: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
suite.oauthServer = oauth.New(context.Background(), suite.db)
|
||||
|
||||
if err := suite.db.Put(context.Background(), suite.testAccount); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue