schema handling for postgres
This commit is contained in:
parent
1b83cd227f
commit
0202727990
2 changed files with 3 additions and 1 deletions
|
@ -18,6 +18,7 @@ func ConfigPgsql() *sql.Cfg {
|
|||
return &sql.Cfg{
|
||||
Driver: "postgres",
|
||||
Connstr: ovr("user=ccotest password=cco dbname=ccotest", PGSQL_CONNSTR),
|
||||
Schema: ovr("testing", PGSQL_SCHEMA),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,6 +27,7 @@ func ConfigPgsql() *sql.Cfg {
|
|||
const (
|
||||
SQLITE_CONNSTR = "sqlite_connstr"
|
||||
PGSQL_CONNSTR = "pgsql_connstr"
|
||||
PGSQL_SCHEMA = "pgsql_schema"
|
||||
)
|
||||
|
||||
// in a production scenario this should be put in a separate
|
||||
|
|
|
@ -80,7 +80,7 @@ func resetSqlite(db *sql.Storage) {
|
|||
|
||||
func resetPgsql(db *sql.Storage) {
|
||||
db.DropTable("test")
|
||||
db.DropTable("tracks")
|
||||
db.DropTable("testing.tracks")
|
||||
db.Exec(pgsql_create_table)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue