Commit d0f55ad4 authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Reset alembic revisions.

parent ea843366
[database]
#sqlalchemy_url = sqlite:///var/db/vispa.db
#sqlalchemy_url = sqlite:////var/db/vispa.db
[alembic]
# inplace installation
......
"""remove password from workspace and update unique keys
Revision ID: 219b64f9f5c8
Revises: 53f0259321a8
Create Date: 2014-01-07 11:35:18.181807
"""
# revision identifiers, used by Alembic.
revision = '219b64f9f5c8'
down_revision = '53f0259321a8'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_column('workspace', u'password')
op.alter_column('workspace', 'user_id',
existing_type=sa.Integer(),
nullable=False)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.alter_column('workspace', 'user_id',
existing_type=sa.Integer(),
nullable=True)
ctype = sa.Column(u'password', sa.Unicode(length=100), nullable=True)
op.add_column('workspace', ctype)
### end Alembic commands ###
"""inital
"""init
Revision ID: 323ad4f65ffd
Revision ID: 3e4b5288af61
Revises: None
Create Date: 2013-11-26 21:49:02.833905
Create Date: 2014-03-27 16:21:23.472862
"""
# revision identifiers, used by Alembic.
revision = '323ad4f65ffd'
revision = '3e4b5288af61'
down_revision = None
from alembic import op
......@@ -29,12 +29,6 @@ def upgrade():
sa.UniqueConstraint('email'),
sa.UniqueConstraint('name')
)
op.create_table('page_statistics',
sa.Column('page', sa.Unicode(length=50), nullable=False),
sa.Column('date', sa.Date(), nullable=False),
sa.Column('pis', sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint('page', 'date')
)
op.create_table('access_statistics',
sa.Column('user_ip', sa.Unicode(length=60), nullable=False),
sa.Column('user_agent', sa.Unicode(length=200), nullable=False),
......@@ -42,40 +36,45 @@ def upgrade():
sa.Column('pis', sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint('user_ip', 'user_agent', 'date')
)
op.create_table('page_statistics',
sa.Column('page', sa.Unicode(length=50), nullable=False),
sa.Column('date', sa.Date(), nullable=False),
sa.Column('pis', sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint('page', 'date')
)
op.create_table('workspace',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=True),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('name', sa.Unicode(length=100), nullable=False),
sa.Column('host', sa.Unicode(length=100), nullable=False),
sa.Column('port', sa.Integer(), nullable=False),
sa.Column('login', sa.Unicode(length=100), nullable=True),
sa.Column('key', sa.Text(), nullable=True),
sa.Column('password', sa.Unicode(length=100), nullable=True),
sa.Column('command', sa.Text(), nullable=True),
sa.Column('basedir', sa.Text(), nullable=True),
sa.Column('created', sa.DateTime(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], onupdate='CASCADE', ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('user_id', 'name')
sa.UniqueConstraint('user_id','name')
)
op.create_table('vispa_preference',
op.create_table('extension_shortcuts',
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('section', sa.Unicode(length=64), nullable=False),
sa.Column('key', sa.Unicode(length=64), nullable=False),
sa.Column('value', sa.Unicode(length=300), nullable=False),
sa.Column('timestamp', sa.DateTime(), nullable=False),
sa.Column('created', sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], onupdate='CASCADE', ondelete='CASCADE'),
sa.PrimaryKeyConstraint('user_id', 'section')
sa.PrimaryKeyConstraint('user_id', 'key')
)
op.create_table('extension_preference',
op.create_table('vispa_preference',
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('key', sa.Unicode(length=64), nullable=False),
sa.Column('section', sa.Unicode(length=64), nullable=False),
sa.Column('value', sa.Unicode(length=300), nullable=False),
sa.Column('timestamp', sa.DateTime(), nullable=False),
sa.Column('created', sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], onupdate='CASCADE', ondelete='CASCADE'),
sa.PrimaryKeyConstraint('user_id', 'key')
sa.PrimaryKeyConstraint('user_id', 'section')
)
op.create_table('extension_shortcuts',
op.create_table('vispa_shortcuts',
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('key', sa.Unicode(length=64), nullable=False),
sa.Column('value', sa.Unicode(length=300), nullable=False),
......@@ -84,7 +83,7 @@ def upgrade():
sa.ForeignKeyConstraint(['user_id'], ['user.id'], onupdate='CASCADE', ondelete='CASCADE'),
sa.PrimaryKeyConstraint('user_id', 'key')
)
op.create_table('vispa_shortcuts',
op.create_table('extension_preference',
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('key', sa.Unicode(length=64), nullable=False),
sa.Column('value', sa.Unicode(length=300), nullable=False),
......@@ -102,18 +101,29 @@ def upgrade():
sa.ForeignKeyConstraint(['workspace_id'], ['workspace.id'], onupdate='CASCADE', ondelete='CASCADE'),
sa.PrimaryKeyConstraint('workspace_id', 'user_id')
)
op.create_table('workspace_connection',
sa.Column('workspace_id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('host', sa.Text(), nullable=False),
sa.Column('tempdir', sa.Text(), nullable=True),
sa.Column('timestamp', sa.DateTime(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], onupdate='CASCADE', ondelete='CASCADE'),
sa.ForeignKeyConstraint(['workspace_id'], ['workspace.id'], onupdate='CASCADE', ondelete='CASCADE'),
sa.PrimaryKeyConstraint('workspace_id', 'user_id')
)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_table('workspace_connection')
op.drop_table('workspace_state')
op.drop_table('vispa_shortcuts')
op.drop_table('extension_shortcuts')
op.drop_table('extension_preference')
op.drop_table('vispa_shortcuts')
op.drop_table('vispa_preference')
op.drop_table('extension_shortcuts')
op.drop_table('workspace')
op.drop_table('access_statistics')
op.drop_table('page_statistics')
op.drop_table('access_statistics')
op.drop_table('user')
### end Alembic commands ###
"""Add port to workspace model
Revision ID: 4e3bac6d6095
Revises: 533e525b1b4
Create Date: 2014-03-27 14:23:27.043326
"""
# revision identifiers, used by Alembic.
revision = '4e3bac6d6095'
down_revision = '533e525b1b4'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.add_column('workspace', sa.Column('port', sa.Integer(), nullable=False))
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_column('workspace', 'port')
### end Alembic commands ###
"""remove basedir from workspace
Revision ID: 533e525b1b4
Revises: 219b64f9f5c8
Create Date: 2014-01-07 11:57:59.509784
"""
# revision identifiers, used by Alembic.
revision = '533e525b1b4'
down_revision = '219b64f9f5c8'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_column('workspace', u'basedir')
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.add_column('workspace', sa.Column(u'basedir', mysql.TEXT(), nullable=True))
### end Alembic commands ###
"""add_workspace_connection
Revision ID: 53f0259321a8
Revises: 323ad4f65ffd
Create Date: 2013-11-26 21:50:37.787190
"""
# revision identifiers, used by Alembic.
revision = '53f0259321a8'
down_revision = '323ad4f65ffd'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('workspace_connection',
sa.Column('workspace_id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('host', sa.Text(), nullable=False),
sa.Column('tempdir', sa.Text(), nullable=True),
sa.Column('timestamp', sa.DateTime(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], onupdate='CASCADE', ondelete='CASCADE'),
sa.ForeignKeyConstraint(['workspace_id'], ['workspace.id'], onupdate='CASCADE', ondelete='CASCADE'),
sa.PrimaryKeyConstraint('workspace_id', 'user_id')
)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_table('workspace_connection')
### end Alembic commands ###
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment