Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(4)  |  Derive(0)  |  Import(3)
Simple helper to get a ref to an already existing table

        def inspect_table(metadata, table_name):
    """Simple helper to get a ref to an already existing table"""
    return Table(table_name, metadata, autoload=True,
                 autoload_with=metadata.bind)
        


src/m/e/mediagoblin-0.6.1/mediagoblin/media_types/video/migrations.py   mediagoblin(Download)
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
from mediagoblin.db.migration_tools import RegisterMigration, inspect_table
 
from sqlalchemy import MetaData, Column, Unicode
def add_orig_metadata_column(db_conn):
    metadata = MetaData(bind=db_conn.bind)
 
    vid_data = inspect_table(metadata, "video__mediadata")
 
def webm_640_to_webm_video(db):
    metadata = MetaData(bind=db.bind)
 
    file_keynames = inspect_table(metadata, 'core__file_keynames')
 

src/j/o/JoshuaGoblin-HEAD/mediagoblin/media_types/video/migrations.py   JoshuaGoblin(Download)
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
from mediagoblin.db.migration_tools import RegisterMigration, inspect_table
 
from sqlalchemy import MetaData, Column, Unicode
def add_orig_metadata_column(db_conn):
    metadata = MetaData(bind=db_conn.bind)
 
    vid_data = inspect_table(metadata, "video__mediadata")
 
def webm_640_to_webm_video(db):
    metadata = MetaData(bind=db.bind)
 
    file_keynames = inspect_table(metadata, 'core__file_keynames')
 

src/j/o/JoshuaGoblin-HEAD/mediagoblin/plugins/dogma/migrations.py   JoshuaGoblin(Download)
 
 
from mediagoblin.db.migration_tools import RegisterMigration, inspect_table
 
MIGRATIONS = {}