Show More
@@ -0,0 +1,31 b'' | |||
|
1 | import logging | |
|
2 | ||
|
3 | from sqlalchemy import Column, MetaData, Unicode | |
|
4 | ||
|
5 | from rhodecode.lib.dbmigrate.versions import _reset_base | |
|
6 | ||
|
7 | log = logging.getLogger(__name__) | |
|
8 | ||
|
9 | ||
|
10 | def upgrade(migrate_engine): | |
|
11 | """ | |
|
12 | Upgrade operations go here. | |
|
13 | Don't create your own engine; bind migrate_engine to your metadata | |
|
14 | """ | |
|
15 | _reset_base(migrate_engine) | |
|
16 | from rhodecode.lib.dbmigrate.schema import db_4_5_0_0 as db | |
|
17 | ||
|
18 | # Add shadow merge ref column to pull request table. | |
|
19 | pr_table = db.PullRequest.__table__ | |
|
20 | pr_col = Column('shadow_merge_ref', Unicode(255), nullable=True) | |
|
21 | pr_col.create(table=pr_table) | |
|
22 | ||
|
23 | # Add shadow merge ref column to pull request version table. | |
|
24 | pr_version_table = db.PullRequestVersion.__table__ | |
|
25 | pr_version_col = Column('shadow_merge_ref', Unicode(255), nullable=True) | |
|
26 | pr_version_col.create(table=pr_version_table) | |
|
27 | ||
|
28 | ||
|
29 | def downgrade(migrate_engine): | |
|
30 | meta = MetaData() | |
|
31 | meta.bind = migrate_engine |
@@ -51,7 +51,7 b' PYRAMID_SETTINGS = {}' | |||
|
51 | 51 | EXTENSIONS = {} |
|
52 | 52 | |
|
53 | 53 | __version__ = ('.'.join((str(each) for each in VERSION[:3]))) |
|
54 |
__dbversion__ = 6 |
|
|
54 | __dbversion__ = 62 # defines current db version for migrations | |
|
55 | 55 | __platform__ = platform.system() |
|
56 | 56 | __license__ = 'AGPLv3, and Commercial License' |
|
57 | 57 | __author__ = 'RhodeCode GmbH' |
General Comments 0
You need to be logged in to leave comments.
Login now