##// END OF EJS Templates
Merge with upstream
Nicolas VINOT -
r1588:8ac66733 merge beta
parent child Browse files
Show More
@@ -160,7 +160,9 class DbManage(object):
160 def step_3(self):
160 def step_3(self):
161 print ('Adding additional settings into RhodeCode db')
161 print ('Adding additional settings into RhodeCode db')
162 self.klass.fix_settings()
162 self.klass.fix_settings()
163
163 print ('Adding ldap defaults')
164 self.klass.create_ldap_options(skip_existing=True)
165
164 upgrade_steps = [0] + range(curr_version + 1, __dbversion__ + 1)
166 upgrade_steps = [0] + range(curr_version + 1, __dbversion__ + 1)
165
167
166 #CALL THE PROPER ORDER OF STEPS TO PERFORM FULL UPGRADE
168 #CALL THE PROPER ORDER OF STEPS TO PERFORM FULL UPGRADE
@@ -307,7 +309,7 class DbManage(object):
307 self.sa.rollback()
309 self.sa.rollback()
308 raise
310 raise
309
311
310 def create_ldap_options(self):
312 def create_ldap_options(self,skip_existing=False):
311 """Creates ldap settings"""
313 """Creates ldap settings"""
312
314
313 try:
315 try:
@@ -319,6 +321,9 class DbManage(object):
319 ('ldap_attr_login', ''), ('ldap_attr_firstname', ''),
321 ('ldap_attr_login', ''), ('ldap_attr_firstname', ''),
320 ('ldap_attr_lastname', ''), ('ldap_attr_email', '')]:
322 ('ldap_attr_lastname', ''), ('ldap_attr_email', '')]:
321
323
324 if skip_existing and RhodeCodeSettings.get_by_name(k) != None:
325 log.debug('Skipping option %s' % k)
326 continue
322 setting = RhodeCodeSettings(k, v)
327 setting = RhodeCodeSettings(k, v)
323 self.sa.add(setting)
328 self.sa.add(setting)
324 self.sa.commit()
329 self.sa.commit()
@@ -76,6 +76,14 def upgrade(migrate_engine):
76 #==========================================================================
76 #==========================================================================
77 from rhodecode.model.db import Repository
77 from rhodecode.model.db import Repository
78
78
79 #ADD clone_uri column#
80
81 clone_uri = Column("clone_uri", String(length=255, convert_unicode=False,
82 assert_unicode=None),
83 nullable=True, unique=False, default=None)
84
85 clone_uri.create(Repository().__table__)
86
79 #ADD downloads column#
87 #ADD downloads column#
80 enable_downloads = Column("downloads", Boolean(), nullable=True, unique=None, default=True)
88 enable_downloads = Column("downloads", Boolean(), nullable=True, unique=None, default=True)
81 enable_downloads.create(Repository().__table__)
89 enable_downloads.create(Repository().__table__)
@@ -92,21 +100,16 def upgrade(migrate_engine):
92 group_id.create(Repository().__table__)
100 group_id.create(Repository().__table__)
93
101
94
102
95 #ADD clone_uri column#
96
97 clone_uri = Column("clone_uri", String(length=255, convert_unicode=False,
98 assert_unicode=None),
99 nullable=True, unique=False, default=None)
100
101 clone_uri.create(Repository().__table__)
102
103
104 #==========================================================================
103 #==========================================================================
105 # Upgrade of `user_followings` table
104 # Upgrade of `user_followings` table
106 #==========================================================================
105 #==========================================================================
107
106
108 follows_from = Column('follows_from', DateTime(timezone=False), nullable=True, unique=None, default=datetime.datetime.now)
107 from rhodecode.model.db import UserFollowing
109 follows_from.create(Repository().__table__)
108
109 follows_from = Column('follows_from', DateTime(timezone=False),
110 nullable=True, unique=None,
111 default=datetime.datetime.now)
112 follows_from.create(UserFollowing().__table__)
110
113
111 return
114 return
112
115
@@ -12,6 +12,7 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 "formencode==1.2.4",
15 "SQLAlchemy>=0.7.2,<0.8",
16 "SQLAlchemy>=0.7.2,<0.8",
16 "Mako>=0.4.2",
17 "Mako>=0.4.2",
17 "pygments>=1.4",
18 "pygments>=1.4",
General Comments 0
You need to be logged in to leave comments. Login now