<reponame>vault-the/changes
"""Add Event

Revision ID: 2c380be0a31e
Revises: <PASSWORD>
Create Date: 2014-04-04 13:06:03.094082

"""

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        'event',
        sa.Column('id', sa.GUID(), nullable=False),
        sa.Column('type', sa.String(length=32), nullable=False),
        sa.Column('item_id', sa.GUID(), nullable=False),
        sa.Column('date_created', sa.DateTime(), nullable=True),
        sa.Column('date_modified', sa.DateTime(), nullable=True),
        sa.Column('data', sa.JSONEncodedDict(), nullable=True),
        sa.PrimaryKeyConstraint('id'),
        sa.UniqueConstraint('type', 'item_id', name='unq_event_key')
    )


def downgrade():
    op.drop_table('event')

"""Add Event

Revision ID: 2c380be0a31e
Revises: <PASSWORD>
Create Date: 2014-04-04 13:06:03.094082

"""

# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = '<PASSWORD>'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        'event',
        sa.Column('id', sa.GUID(), nullable=False),
        sa.Column('type', sa.String(length=32), nullable=False),
        sa.Column('item_id', sa.GUID(), nullable=False),
        sa.Column('date_created', sa.DateTime(), nullable=True),
        sa.Column('date_modified', sa.DateTime(), nullable=True),
        sa.Column('data', sa.JSONEncodedDict(), nullable=True),
        sa.PrimaryKeyConstraint('id'),
        sa.UniqueConstraint('type', 'item_id', name='unq_event_key')
    )


def downgrade():
    op.drop_table('event')
Add Event  Revision ID: 2c380be0a31e Revises: <PASSWORD> Create Date: 2014-04-04 13:06:03.094082 # revision identifiers, used by Alembic. ### commands auto generated by Alembic - please adjust! ###