##// END OF EJS Templates
sync sqlalchemy migrate with latest changes
marcink -
r3767:e203cd36 beta
parent child Browse files
Show More
@@ -7,7 +7,7 b' import logging'
7 7 from sqlalchemy import (Table, Column, MetaData, String, Text, Integer,
8 8 create_engine)
9 9 from sqlalchemy.sql import and_
10 from sqlalchemy import exceptions as sa_exceptions
10 from sqlalchemy import exc as sa_exceptions
11 11 from sqlalchemy.sql import bindparam
12 12
13 13 from rhodecode.lib.dbmigrate.migrate import exceptions
@@ -20,6 +20,7 b' from rhodecode.lib.dbmigrate.migrate.ver'
20 20
21 21 log = logging.getLogger(__name__)
22 22
23
23 24 class ControlledSchema(object):
24 25 """A database under version control"""
25 26
@@ -10,6 +10,7 b' from sqlalchemy.types import Float'
10 10
11 11 log = logging.getLogger(__name__)
12 12
13
13 14 def getDiffOfModelAgainstDatabase(metadata, engine, excludeTables=None):
14 15 """
15 16 Return differences of model against database.
@@ -17,7 +18,8 b' def getDiffOfModelAgainstDatabase(metada'
17 18 :return: object which will evaluate to :keyword:`True` if there \
18 19 are differences else :keyword:`False`.
19 20 """
20 db_metadata = sqlalchemy.MetaData(engine, reflect=True)
21 db_metadata = sqlalchemy.MetaData(engine)
22 db_metadata.reflect()
21 23
22 24 # sqlite will include a dynamically generated 'sqlite_sequence' table if
23 25 # there are autoincrement sequences in the database; this should not be
General Comments 0
You need to be logged in to leave comments. Login now