Show More
The requested changes are too big and content was truncated. Show full diff
|
1 | NO CONTENT: new file 100644 | |
The requested commit or file is too big and content was truncated. Show full diff |
@@ -0,0 +1,34 b'' | |||
|
1 | import logging | |
|
2 | import datetime | |
|
3 | ||
|
4 | from sqlalchemy import * | |
|
5 | from sqlalchemy.exc import DatabaseError | |
|
6 | from sqlalchemy.orm import relation, backref, class_mapper, joinedload | |
|
7 | from sqlalchemy.orm.session import Session | |
|
8 | from sqlalchemy.ext.declarative import declarative_base | |
|
9 | ||
|
10 | from rhodecode.lib.dbmigrate.migrate import * | |
|
11 | from rhodecode.lib.dbmigrate.migrate.changeset import * | |
|
12 | from rhodecode.lib.utils2 import str2bool | |
|
13 | ||
|
14 | from rhodecode.model.meta import Base | |
|
15 | from rhodecode.model import meta | |
|
16 | from rhodecode.lib.dbmigrate.versions import _reset_base, notify | |
|
17 | ||
|
18 | log = logging.getLogger(__name__) | |
|
19 | ||
|
20 | ||
|
21 | def upgrade(migrate_engine): | |
|
22 | """ | |
|
23 | Upgrade operations go here. | |
|
24 | Don't create your own engine; bind migrate_engine to your metadata | |
|
25 | """ | |
|
26 | _reset_base(migrate_engine) | |
|
27 | from rhodecode.lib.dbmigrate.schema import db_4_5_0_0 | |
|
28 | ||
|
29 | db_4_5_0_0.PullRequestReviewers.reason.create( | |
|
30 | table=db_4_5_0_0.PullRequestReviewers.__table__) | |
|
31 | ||
|
32 | def downgrade(migrate_engine): | |
|
33 | meta = MetaData() | |
|
34 | 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__ = |
|
|
54 | __dbversion__ = 60 # defines current db version for migrations | |
|
55 | 55 | __platform__ = platform.system() |
|
56 | 56 | __license__ = 'AGPLv3, and Commercial License' |
|
57 | 57 | __author__ = 'RhodeCode GmbH' |
@@ -3215,6 +3215,8 b' class PullRequestReviewers(Base, BaseMod' | |||
|
3215 | 3215 | ForeignKey('pull_requests.pull_request_id'), nullable=False) |
|
3216 | 3216 | user_id = Column( |
|
3217 | 3217 | "user_id", Integer(), ForeignKey('users.user_id'), nullable=True) |
|
3218 | reason = Column('reason', | |
|
3219 | UnicodeText().with_variant(UnicodeText(255), 'mysql'), nullable=True) | |
|
3218 | 3220 | |
|
3219 | 3221 | user = relationship('User') |
|
3220 | 3222 | pull_request = relationship('PullRequest') |
General Comments 0
You need to be logged in to leave comments.
Login now