1
2 from buildbot.db.schema import base
3
8
10 if self.dbapiName == 'MySQLdb':
11 default_text = ""
12 else:
13 default_text = "default ''"
14
15 cursor = self.conn.cursor()
16 cursor.execute("""
17 ALTER TABLE changes
18 add column `repository` text not null %s
19 """ % default_text)
20 cursor.execute("""
21 ALTER TABLE changes
22 add column `project` text not null %s
23 """ % default_text)
24 cursor.execute("""
25 ALTER TABLE sourcestamps
26 add column `repository` text not null %s
27 """ % default_text)
28 cursor.execute("""
29 ALTER TABLE sourcestamps
30 add column `project` text not null %s
31 """ % default_text)
32
34 c = self.conn.cursor()
35 c.execute("""UPDATE version set version = 2 where version = 1""")
36