sphinx_django/db_script.py~
changeset 4 e6e33366df0f
parent 3 de4a2ed2f34b
child 5 c263a26867d4
equal deleted inserted replaced
3:de4a2ed2f34b 4:e6e33366df0f
     1 from sqlalchemy import *
       
     2 
       
     3 db = create_engine('sqlite:///test.db')
       
     4 
       
     5 db.echo = False  # Try changing this to True and see what happens
       
     6 
       
     7 metadata = MetaData(db)
       
     8 
       
     9 chapter = Table('Chapter', metadata,
       
    10     Column('id', Integer, primary_key=True),
       
    11     Column('name', String(40)),
       
    12 )
       
    13 chapter.create()
       
    14 
       
    15 i = users.insert()
       
    16 i.execute(name='basic_func')
       
    17