##// END OF EJS Templates
dependencies: Adding Bower out of nixpkgs...
dependencies: Adding Bower out of nixpkgs Usually bower would be installed globally, so it seems to be appropriate to use the one out of the nixpkgs so that we don't have to pin a specific version ourselves.

File last commit:

r1:854a839a default
r709:a198b78f default
Show More
049_version_4_0_0.py
49 lines | 1.5 KiB | text/x-python | PythonLexer
project: added all source files and assets
r1 # -*- coding: utf-8 -*-
import logging
import sqlalchemy as sa
from alembic.migration import MigrationContext
from alembic.operations import Operations
from rhodecode.lib.dbmigrate.versions import _reset_base
from rhodecode.model import init_model_encryption
log = logging.getLogger(__name__)
def upgrade(migrate_engine):
"""
Upgrade operations go here.
Don't create your own engine; bind migrate_engine to your metadata
"""
_reset_base(migrate_engine)
from rhodecode.lib.dbmigrate.schema import db_3_7_0_0
init_model_encryption(db_3_7_0_0)
context = MigrationContext.configure(migrate_engine.connect())
op = Operations(context)
op.create_table(
'external_identities',
sa.Column('provider_name', sa.Unicode(255), primary_key=True),
sa.Column('local_user_id', sa.Integer(),
sa.ForeignKey('users.user_id'), primary_key=True),
sa.Column('external_id', sa.Unicode(255), primary_key=True),
sa.Column('external_username', sa.Unicode(1024), default=u''),
sa.Column('access_token', sa.String(1024), default=u''),
sa.Column('alt_token', sa.String(1024), default=u''),
sa.Column('token_secret', sa.String(1024), default=u'')
)
op.create_index('local_user_id_idx', 'external_identities',
['local_user_id'])
op.create_index('external_id_idx', 'external_identities',
['external_id'])
def downgrade(migrate_engine):
pass