root/galaxy-central/lib/galaxy/model/migrate/versions/0044_add_notify_column_to_request_table.py @ 2

リビジョン 2, 0.5 KB (コミッタ: hatakeyama, 14 年 前)

import galaxy-central

行番号 
1"""
2Migration script to add a notify column to the request table.
3"""
4
5from sqlalchemy import *
6from migrate import *
7from migrate.changeset import *
8
9import logging
10log = logging.getLogger( __name__ )
11
12metadata = MetaData( migrate_engine )
13
14def upgrade():
15    print __doc__
16    metadata.reflect()
17   
18    Request_table = Table( "request", metadata, autoload=True )
19    c = Column( "notify", Boolean, default=False  )
20    c.create( Request_table )
21    assert c is Request_table.c.notify
22
23def downgrade():
24    pass
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。