Skip to content

Commit f4baac5

Browse files
committed
Try to fix errors on Travis
I'm seeing "ProgrammingError: no schema has been selected to create in." Maybe we can drop and recreate the public schema?
1 parent 0cbb228 commit f4baac5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

postgres/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,8 @@ def make(self, values):
874874

875875
if __name__ == '__main__':
876876
db = Postgres("postgres://jrandom@localhost/test")
877+
db.run("DROP SCHEMA IF EXISTS public CASCADE")
878+
db.run("CREATE SCHEMA public")
877879
db.run("DROP TABLE IF EXISTS foo CASCADE")
878880
import doctest
879881
doctest.testmod()

postgres/orm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ def update_attributes(self, **kw):
261261

262262
from postgres import Postgres
263263
db = Postgres("postgres://jrandom@localhost/test")
264+
db.run("DROP SCHEMA IF EXISTS public CASCADE")
265+
db.run("CREATE SCHEMA public")
264266
db.run("DROP TABLE IF EXISTS foo CASCADE")
265267
db.run("CREATE TABLE foo (bar text, baz int)")
266268
db.run("INSERT INTO foo VALUES ('blam', 42)")

0 commit comments

Comments
 (0)