refactor: déplacer schema vers sql/schema.sql et sql.Schema()
This commit is contained in:
parent
e945907771
commit
40dcd82e54
5 changed files with 20 additions and 10 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"git.agecem.com/agecem/bottin-agenda/models"
|
||||
"git.agecem.com/agecem/bottin-agenda/sql"
|
||||
_ "github.com/jackc/pgx/stdlib"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"github.com/spf13/viper"
|
||||
|
@ -59,7 +60,7 @@ func NewDataClient(connection PostgresConnection) (*DataClient, error) {
|
|||
}
|
||||
|
||||
func (d *DataClient) Seed() (int64, error) {
|
||||
result, err := d.DB.Exec(models.Schema)
|
||||
result, err := d.DB.Exec(sql.Schema())
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
|
Reference in a new issue