~gandelman-a/ubuntu/precise/keystone/UCA_2012.2.1

« back to all changes in this revision

Viewing changes to keystone/common/sql/migrate_repo/versions/003_token_valid.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Adam Gandelman, Soren Hansen, Logan Rosen, Chuck Short
  • Date: 2012-09-07 13:04:01 UTC
  • mfrom: (1.1.22)
  • Revision ID: package-import@ubuntu.com-20120907130401-o49wh9xxkr2cmuqx
Tags: 2012.2~rc1~20120906.2517-0ubuntu2
[ Adam Gandelman ]
* Refreshed patches.

[ Soren Hansen ]
* Update debian/watch to account for symbolically named tarballs and
  use newer URL.
* Fix Launchpad URLs in debian/watch.

[ Logan Rosen ]
* Fix control file to suggest python-memcache instead of python-memcached
  (LP: #998991).

[ Chuck Short ]
* New upstream version.
* Dont FTBFS if the testsuite fails.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4
 
2
 
 
3
# Copyright 2012 OpenStack LLC
 
4
#
 
5
# Licensed under the Apache License, Version 2.0 (the "License"); you may
 
6
# not use this file except in compliance with the License. You may obtain
 
7
# a copy of the License at
 
8
#
 
9
#      http://www.apache.org/licenses/LICENSE-2.0
 
10
#
 
11
# Unless required by applicable law or agreed to in writing, software
 
12
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 
13
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 
14
# License for the specific language governing permissions and limitations
 
15
# under the License.
 
16
 
 
17
 
 
18
from migrate import *
 
19
from sqlalchemy import *
 
20
 
 
21
 
 
22
from keystone.common import sql
 
23
 
 
24
 
 
25
def upgrade(migrate_engine):
 
26
    # Upgrade operations go here. Don't create your own engine; bind
 
27
 
 
28
    meta = MetaData()
 
29
    meta.bind = migrate_engine
 
30
    dialect = migrate_engine.url.get_dialect().name
 
31
    token = Table('token', meta, autoload=True)
 
32
    valid = Column("valid", Boolean(), ColumnDefault(True), nullable=False)
 
33
    token.create_column(valid)
 
34
 
 
35
 
 
36
def downgrade(migrate_engine):
 
37
    meta = MetaData()
 
38
    meta.bind = migrate_engine
 
39
    token = Table('token', meta, autoload=True)
 
40
    token.drop_column('valid')