1 # Copyright (c) 2015 OpenStack Foundation
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
16 """Opendaylight Neutron mechanism driver refactor
18 Revision ID: 37e242787ae5
20 Create Date: 2015-10-30 22:09:27.221767
23 from neutron.db import migration
26 # revision identifiers, used by Alembic.
27 revision = '37e242787ae5'
28 down_revision = '247501328046'
30 # milestone identifier, used by neutron-db-manage
31 neutron_milestone = [migration.MITAKA]
34 from alembic import op
35 import sqlalchemy as sa
40 'opendaylightjournal',
41 sa.Column('id', sa.String(36), primary_key=True),
42 sa.Column('object_type', sa.String(36), nullable=False),
43 sa.Column('object_uuid', sa.String(36), nullable=False),
44 sa.Column('operation', sa.String(36), nullable=False),
45 sa.Column('data', sa.PickleType, nullable=True),
47 sa.Enum('pending', 'processing', 'failed', 'completed',
49 nullable=False, default='pending'),
50 sa.Column('retry_count', sa.Integer, default=0),
51 sa.Column('created_at', sa.DateTime, default=sa.func.now()),
52 sa.Column('last_retried', sa.TIMESTAMP, server_default=sa.func.now(),
53 onupdate=sa.func.now())