##// END OF EJS Templates
Bumped sqlalchemy version to 0.7, replaced timerproxy with new event system for sqlalchemy....
marcink -
r1360:1f47adeb beta
parent child Browse files
Show More
@@ -142,9 +142,9 b' logview.pylons.util = #eee'
142 #########################################################
142 #########################################################
143 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
143 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
144 #########################################################
144 #########################################################
145 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
145 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
146 #sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode
146 sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode
147 sqlalchemy.db1.echo = True
147 sqlalchemy.db1.echo = false
148 sqlalchemy.db1.pool_recycle = 3600
148 sqlalchemy.db1.pool_recycle = 3600
149 sqlalchemy.convert_unicode = true
149 sqlalchemy.convert_unicode = true
150
150
@@ -205,13 +205,13 b' propagate = 0'
205 [handler_console]
205 [handler_console]
206 class = StreamHandler
206 class = StreamHandler
207 args = (sys.stderr,)
207 args = (sys.stderr,)
208 level = NOTSET
208 level = DEBUG
209 formatter = color_formatter
209 formatter = color_formatter
210
210
211 [handler_console_sql]
211 [handler_console_sql]
212 class = StreamHandler
212 class = StreamHandler
213 args = (sys.stderr,)
213 args = (sys.stderr,)
214 level = NOTSET
214 level = DEBUG
215 formatter = color_formatter_sql
215 formatter = color_formatter_sql
216
216
217 ################
217 ################
@@ -144,7 +144,7 b' logview.pylons.util = #eee'
144 #########################################################
144 #########################################################
145 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
145 #sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
146 sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode
146 sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode
147 sqlalchemy.db1.echo = True
147 sqlalchemy.db1.echo = false
148 sqlalchemy.db1.pool_recycle = 3600
148 sqlalchemy.db1.pool_recycle = 3600
149 sqlalchemy.convert_unicode = true
149 sqlalchemy.convert_unicode = true
150
150
@@ -143,7 +143,7 b' logview.pylons.util = #eee'
143 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
143 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
144 #########################################################
144 #########################################################
145 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
145 sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode.db
146 sqlalchemy.db1.echo = True
146 sqlalchemy.db1.echo = false
147 sqlalchemy.db1.pool_recycle = 3600
147 sqlalchemy.db1.pool_recycle = 3600
148 sqlalchemy.convert_unicode = true
148 sqlalchemy.convert_unicode = true
149
149
@@ -65,12 +65,7 b' def load_environment(global_conf, app_co'
65
65
66 #MULTIPLE DB configs
66 #MULTIPLE DB configs
67 # Setup the SQLAlchemy database engine
67 # Setup the SQLAlchemy database engine
68 if config['debug'] and not test:
68 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
69 #use query time debugging.
70 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.',
71 proxy=TimerProxy())
72 else:
73 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
74
69
75 init_model(sa_engine_db1)
70 init_model(sa_engine_db1)
76
71
@@ -161,18 +161,60 b" def safe_unicode(_str, from_encoding='ut"
161 def engine_from_config(configuration, prefix='sqlalchemy.', **kwargs):
161 def engine_from_config(configuration, prefix='sqlalchemy.', **kwargs):
162 """
162 """
163 Custom engine_from_config functions that makes sure we use NullPool for
163 Custom engine_from_config functions that makes sure we use NullPool for
164 file based sqlite databases. This prevents errors on sqlite.
164 file based sqlite databases. This prevents errors on sqlite. This only
165 applies to sqlalchemy versions < 0.7.0
165
166
166 """
167 """
168 import sqlalchemy
167 from sqlalchemy import engine_from_config as efc
169 from sqlalchemy import engine_from_config as efc
168 from sqlalchemy.pool import NullPool
170 import logging
171
172 if int(sqlalchemy.__version__.split('.')[1]) < 7:
173
174 # This solution should work for sqlalchemy < 0.7.0, and should use
175 # proxy=TimerProxy() for execution time profiling
176
177 from sqlalchemy.pool import NullPool
178 url = configuration[prefix + 'url']
169
179
170 url = configuration[prefix + 'url']
180 if url.startswith('sqlite'):
181 kwargs.update({'poolclass': NullPool})
182 return efc(configuration, prefix, **kwargs)
183 else:
184 import time
185 from sqlalchemy import event
186 from sqlalchemy.engine import Engine
187
188 log = logging.getLogger('timerproxy')
189 BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = xrange(30, 38)
190 engine = efc(configuration, prefix, **kwargs)
171
191
172 if url.startswith('sqlite'):
192 def color_sql(sql):
173 kwargs.update({'poolclass': NullPool})
193 COLOR_SEQ = "\033[1;%dm"
194 COLOR_SQL = YELLOW
195 normal = '\x1b[0m'
196 return ''.join([COLOR_SEQ % COLOR_SQL, sql, normal])
197
198 if configuration['debug']:
199 #attach events only for debug configuration
174
200
175 return efc(configuration, prefix, **kwargs)
201 def before_cursor_execute(conn, cursor, statement,
202 parameters, context, executemany):
203 context._query_start_time = time.time()
204 log.info(color_sql(">>>>> STARTING QUERY >>>>>"))
205
206
207 def after_cursor_execute(conn, cursor, statement,
208 parameters, context, executemany):
209 total = time.time() - context._query_start_time
210 log.info(color_sql("<<<<< TOTAL TIME: %f <<<<<" % total))
211
212 event.listen(engine, "before_cursor_execute",
213 before_cursor_execute)
214 event.listen(engine, "after_cursor_execute",
215 after_cursor_execute)
216
217 return engine
176
218
177
219
178 def age(curdate):
220 def age(curdate):
@@ -62,7 +62,7 b' class ColorFormatter(logging.Formatter):'
62 def_record = logging.Formatter.format(self, record)
62 def_record = logging.Formatter.format(self, record)
63 end = RESET_SEQ
63 end = RESET_SEQ
64
64
65 colored_record = start + def_record + end
65 colored_record = ''.join([start, def_record, end])
66 return colored_record
66 return colored_record
67
67
68
68
@@ -81,5 +81,5 b' class ColorFormatterSql(logging.Formatte'
81 def_record = format_sql(logging.Formatter.format(self, record))
81 def_record = format_sql(logging.Formatter.format(self, record))
82 end = RESET_SEQ
82 end = RESET_SEQ
83
83
84 colored_record = start + def_record + end
84 colored_record = ''.join([start, def_record, end])
85 return colored_record
85 return colored_record
@@ -10,7 +10,7 b' def color_sql(sql):'
10 COLOR_SEQ = "\033[1;%dm"
10 COLOR_SEQ = "\033[1;%dm"
11 COLOR_SQL = YELLOW
11 COLOR_SQL = YELLOW
12 normal = '\x1b[0m'
12 normal = '\x1b[0m'
13 return COLOR_SEQ % COLOR_SQL + sql + normal
13 return ''.join([COLOR_SEQ % COLOR_SQL, sql, normal])
14
14
15
15
16 class TimerProxy(ConnectionProxy):
16 class TimerProxy(ConnectionProxy):
@@ -50,7 +50,7 b' class RepositoryMapper(MapperExtension):'
50
50
51 class RhodeCodeSettings(Base):
51 class RhodeCodeSettings(Base):
52 __tablename__ = 'rhodecode_settings'
52 __tablename__ = 'rhodecode_settings'
53 __table_args__ = (UniqueConstraint('app_settings_name'), {'useexisting':True})
53 __table_args__ = (UniqueConstraint('app_settings_name'), {'extend_existing':True})
54 app_settings_id = Column("app_settings_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
54 app_settings_id = Column("app_settings_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
55 app_settings_name = Column("app_settings_name", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
55 app_settings_name = Column("app_settings_name", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
56 app_settings_value = Column("app_settings_value", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
56 app_settings_value = Column("app_settings_value", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
@@ -99,7 +99,7 b' class RhodeCodeSettings(Base):'
99
99
100 class RhodeCodeUi(Base):
100 class RhodeCodeUi(Base):
101 __tablename__ = 'rhodecode_ui'
101 __tablename__ = 'rhodecode_ui'
102 __table_args__ = {'useexisting':True}
102 __table_args__ = {'extend_existing':True}
103 ui_id = Column("ui_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
103 ui_id = Column("ui_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
104 ui_section = Column("ui_section", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
104 ui_section = Column("ui_section", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
105 ui_key = Column("ui_key", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
105 ui_key = Column("ui_key", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
@@ -114,7 +114,7 b' class RhodeCodeUi(Base):'
114
114
115 class User(Base):
115 class User(Base):
116 __tablename__ = 'users'
116 __tablename__ = 'users'
117 __table_args__ = (UniqueConstraint('username'), UniqueConstraint('email'), {'useexisting':True})
117 __table_args__ = (UniqueConstraint('username'), UniqueConstraint('email'), {'extend_existing':True})
118 user_id = Column("user_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
118 user_id = Column("user_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
119 username = Column("username", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
119 username = Column("username", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
120 password = Column("password", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
120 password = Column("password", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
@@ -173,10 +173,10 b' class User(Base):'
173
173
174 class UserLog(Base):
174 class UserLog(Base):
175 __tablename__ = 'user_logs'
175 __tablename__ = 'user_logs'
176 __table_args__ = {'useexisting':True}
176 __table_args__ = {'extend_existing':True}
177 user_log_id = Column("user_log_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
177 user_log_id = Column("user_log_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
178 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
178 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
179 repository_id = Column("repository_id", Integer(length=None, convert_unicode=False, assert_unicode=None), ForeignKey('repositories.repo_id'), nullable=False, unique=None, default=None)
179 repository_id = Column("repository_id", Integer(), ForeignKey('repositories.repo_id'), nullable=False, unique=None, default=None)
180 repository_name = Column("repository_name", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
180 repository_name = Column("repository_name", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
181 user_ip = Column("user_ip", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
181 user_ip = Column("user_ip", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
182 action = Column("action", UnicodeText(length=1200000, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
182 action = Column("action", UnicodeText(length=1200000, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
@@ -192,7 +192,7 b' class UserLog(Base):'
192
192
193 class UsersGroup(Base):
193 class UsersGroup(Base):
194 __tablename__ = 'users_groups'
194 __tablename__ = 'users_groups'
195 __table_args__ = {'useexisting':True}
195 __table_args__ = {'extend_existing':True}
196
196
197 users_group_id = Column("users_group_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
197 users_group_id = Column("users_group_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
198 users_group_name = Column("users_group_name", String(length=255, convert_unicode=False, assert_unicode=None), nullable=False, unique=True, default=None)
198 users_group_name = Column("users_group_name", String(length=255, convert_unicode=False, assert_unicode=None), nullable=False, unique=True, default=None)
@@ -216,7 +216,7 b' class UsersGroup(Base):'
216
216
217 class UsersGroupMember(Base):
217 class UsersGroupMember(Base):
218 __tablename__ = 'users_groups_members'
218 __tablename__ = 'users_groups_members'
219 __table_args__ = {'useexisting':True}
219 __table_args__ = {'extend_existing':True}
220
220
221 users_group_member_id = Column("users_group_member_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
221 users_group_member_id = Column("users_group_member_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
222 users_group_id = Column("users_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
222 users_group_id = Column("users_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
@@ -231,7 +231,7 b' class UsersGroupMember(Base):'
231
231
232 class Repository(Base):
232 class Repository(Base):
233 __tablename__ = 'repositories'
233 __tablename__ = 'repositories'
234 __table_args__ = (UniqueConstraint('repo_name'), {'useexisting':True},)
234 __table_args__ = (UniqueConstraint('repo_name'), {'extend_existing':True},)
235 __mapper_args__ = {'extension':RepositoryMapper()}
235 __mapper_args__ = {'extension':RepositoryMapper()}
236
236
237 repo_id = Column("repo_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
237 repo_id = Column("repo_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
@@ -302,7 +302,7 b' class Repository(Base):'
302 class Group(Base):
302 class Group(Base):
303 __tablename__ = 'groups'
303 __tablename__ = 'groups'
304 __table_args__ = (UniqueConstraint('group_name', 'group_parent_id'),
304 __table_args__ = (UniqueConstraint('group_name', 'group_parent_id'),
305 CheckConstraint('group_id != group_parent_id'), {'useexisting':True},)
305 CheckConstraint('group_id != group_parent_id'), {'extend_existing':True},)
306 __mapper_args__ = {'order_by':'group_name'}
306 __mapper_args__ = {'order_by':'group_name'}
307
307
308 group_id = Column("group_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
308 group_id = Column("group_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
@@ -361,7 +361,7 b' class Group(Base):'
361
361
362 class Permission(Base):
362 class Permission(Base):
363 __tablename__ = 'permissions'
363 __tablename__ = 'permissions'
364 __table_args__ = {'useexisting':True}
364 __table_args__ = {'extend_existing':True}
365 permission_id = Column("permission_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
365 permission_id = Column("permission_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
366 permission_name = Column("permission_name", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
366 permission_name = Column("permission_name", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
367 permission_longname = Column("permission_longname", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
367 permission_longname = Column("permission_longname", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
@@ -376,7 +376,7 b' class Permission(Base):'
376
376
377 class RepoToPerm(Base):
377 class RepoToPerm(Base):
378 __tablename__ = 'repo_to_perm'
378 __tablename__ = 'repo_to_perm'
379 __table_args__ = (UniqueConstraint('user_id', 'repository_id'), {'useexisting':True})
379 __table_args__ = (UniqueConstraint('user_id', 'repository_id'), {'extend_existing':True})
380 repo_to_perm_id = Column("repo_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
380 repo_to_perm_id = Column("repo_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
381 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
381 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
382 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
382 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
@@ -388,7 +388,7 b' class RepoToPerm(Base):'
388
388
389 class UserToPerm(Base):
389 class UserToPerm(Base):
390 __tablename__ = 'user_to_perm'
390 __tablename__ = 'user_to_perm'
391 __table_args__ = (UniqueConstraint('user_id', 'permission_id'), {'useexisting':True})
391 __table_args__ = (UniqueConstraint('user_id', 'permission_id'), {'extend_existing':True})
392 user_to_perm_id = Column("user_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
392 user_to_perm_id = Column("user_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
393 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
393 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
394 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
394 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
@@ -433,7 +433,7 b' class UserToPerm(Base):'
433
433
434 class UsersGroupRepoToPerm(Base):
434 class UsersGroupRepoToPerm(Base):
435 __tablename__ = 'users_group_repo_to_perm'
435 __tablename__ = 'users_group_repo_to_perm'
436 __table_args__ = (UniqueConstraint('users_group_id', 'permission_id'), {'useexisting':True})
436 __table_args__ = (UniqueConstraint('users_group_id', 'permission_id'), {'extend_existing':True})
437 users_group_to_perm_id = Column("users_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
437 users_group_to_perm_id = Column("users_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
438 users_group_id = Column("users_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
438 users_group_id = Column("users_group_id", Integer(), ForeignKey('users_groups.users_group_id'), nullable=False, unique=None, default=None)
439 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
439 permission_id = Column("permission_id", Integer(), ForeignKey('permissions.permission_id'), nullable=False, unique=None, default=None)
@@ -494,7 +494,7 b' class UsersGroupToPerm(Base):'
494
494
495 class GroupToPerm(Base):
495 class GroupToPerm(Base):
496 __tablename__ = 'group_to_perm'
496 __tablename__ = 'group_to_perm'
497 __table_args__ = (UniqueConstraint('group_id', 'permission_id'), {'useexisting':True})
497 __table_args__ = (UniqueConstraint('group_id', 'permission_id'), {'extend_existing':True})
498
498
499 group_to_perm_id = Column("group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
499 group_to_perm_id = Column("group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
500 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
500 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
@@ -507,7 +507,7 b' class GroupToPerm(Base):'
507
507
508 class Statistics(Base):
508 class Statistics(Base):
509 __tablename__ = 'statistics'
509 __tablename__ = 'statistics'
510 __table_args__ = (UniqueConstraint('repository_id'), {'useexisting':True})
510 __table_args__ = (UniqueConstraint('repository_id'), {'extend_existing':True})
511 stat_id = Column("stat_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
511 stat_id = Column("stat_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
512 repository_id = Column("repository_id", Integer(), ForeignKey('repositories.repo_id'), nullable=False, unique=True, default=None)
512 repository_id = Column("repository_id", Integer(), ForeignKey('repositories.repo_id'), nullable=False, unique=True, default=None)
513 stat_on_revision = Column("stat_on_revision", Integer(), nullable=False)
513 stat_on_revision = Column("stat_on_revision", Integer(), nullable=False)
@@ -521,7 +521,7 b' class UserFollowing(Base):'
521 __tablename__ = 'user_followings'
521 __tablename__ = 'user_followings'
522 __table_args__ = (UniqueConstraint('user_id', 'follows_repository_id'),
522 __table_args__ = (UniqueConstraint('user_id', 'follows_repository_id'),
523 UniqueConstraint('user_id', 'follows_user_id')
523 UniqueConstraint('user_id', 'follows_user_id')
524 , {'useexisting':True})
524 , {'extend_existing':True})
525
525
526 user_following_id = Column("user_following_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
526 user_following_id = Column("user_following_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
527 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
527 user_id = Column("user_id", Integer(), ForeignKey('users.user_id'), nullable=False, unique=None, default=None)
@@ -542,7 +542,7 b' class UserFollowing(Base):'
542
542
543 class CacheInvalidation(Base):
543 class CacheInvalidation(Base):
544 __tablename__ = 'cache_invalidation'
544 __tablename__ = 'cache_invalidation'
545 __table_args__ = (UniqueConstraint('cache_key'), {'useexisting':True})
545 __table_args__ = (UniqueConstraint('cache_key'), {'extend_existing':True})
546 cache_id = Column("cache_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
546 cache_id = Column("cache_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
547 cache_key = Column("cache_key", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
547 cache_key = Column("cache_key", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
548 cache_args = Column("cache_args", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
548 cache_args = Column("cache_args", String(length=255, convert_unicode=False, assert_unicode=None), nullable=True, unique=None, default=None)
@@ -560,7 +560,7 b' class CacheInvalidation(Base):'
560
560
561 class DbMigrateVersion(Base):
561 class DbMigrateVersion(Base):
562 __tablename__ = 'db_migrate_version'
562 __tablename__ = 'db_migrate_version'
563 __table_args__ = {'useexisting':True}
563 __table_args__ = {'extend_existing':True}
564 repository_id = Column('repository_id', String(250), primary_key=True)
564 repository_id = Column('repository_id', String(250), primary_key=True)
565 repository_path = Column('repository_path', Text)
565 repository_path = Column('repository_path', Text)
566 version = Column('version', Integer)
566 version = Column('version', Integer)
@@ -12,12 +12,12 b' if py_version < (2, 5):'
12 requirements = [
12 requirements = [
13 "Pylons==1.0.0",
13 "Pylons==1.0.0",
14 "WebHelpers>=1.2",
14 "WebHelpers>=1.2",
15 "SQLAlchemy>=0.6.6",
15 "SQLAlchemy>=0.7.0",
16 "Mako>=0.4.0",
16 "Mako>=0.4.0",
17 "vcs>=0.2.1",
17 "vcs>=0.2.1",
18 "pygments>=1.4",
18 "pygments>=1.4",
19 "mercurial>=1.8.1",
19 "mercurial>=1.8.1",
20 "whoosh>=1.8.0",
20 "whoosh>=1.8.4",
21 "celery>=2.2.5",
21 "celery>=2.2.5",
22 "babel",
22 "babel",
23 "python-dateutil>=1.5.0,<2.0.0",
23 "python-dateutil>=1.5.0,<2.0.0",
General Comments 0
You need to be logged in to leave comments. Login now