Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schemup.egg-info
*.pyc
14 changes: 1 addition & 13 deletions schemup/dbs/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,11 @@ def commit(self):
def ensureSchemaTable(self):
cur = self.conn.cursor()
cur.execute(
"SELECT COUNT(*)"
" FROM information_schema.tables"
" WHERE table_name = 'schemup_tables'")

if cur.fetchone()[0]:
return

print "Creating schema table..."
cur.execute(
"CREATE TABLE schemup_tables ("
"CREATE TABLE IF NOT EXISTS schemup_tables ("
" table_name VARCHAR NOT NULL,"
" version VARCHAR NOT NULL,"
" is_current BOOLEAN NOT NULL DEFAULT 'f',"
" schema TEXT)")

self.conn.commit()


def clearSchemaTable(self):
self.execute("DELETE FROM schemup_tables")
Expand Down