Subversion Repositories SmartDukaan

Rev

Rev 1131 | Rev 1395 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1131 Rev 1248
Line 30... Line 30...
30
    password = Field(String(30))
30
    password = Field(String(30))
31
    providerId = Field(Integer)
31
    providerId = Field(Integer)
32
    using_options(shortnames=True)
32
    using_options(shortnames=True)
33
    using_table_options(mysql_engine="InnoDB")
33
    using_table_options(mysql_engine="InnoDB")
34
 
34
 
35
def initialize():
35
def initialize(dbname='helper'):
36
    #metadata.bind = "sqlite:///message.sqlite" #need to read it from configserver.
36
    #metadata.bind = "sqlite:///message.sqlite" #need to read it from configserver.
37
    engine = create_engine('mysql://root:shop2020@localhost/helper', pool_recycle=7200)
37
    engine = create_engine('mysql://root:shop2020@localhost/' + dbname, pool_recycle=7200)
38
    metadata.bind = engine
38
    metadata.bind = engine
39
    metadata.bind.echo = True
39
    metadata.bind.echo = True
40
    setup_all(True)
40
    setup_all(True)
41
 
41
 
42
if __name__=="__main__":
42
if __name__=="__main__":