Subversion Repositories SmartDukaan

Rev

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

Rev 5864 Rev 7410
Line 99... Line 99...
99
    url = Field(String(220))
99
    url = Field(String(220))
100
    text = Field(String(220))
100
    text = Field(String(220))
101
    using_options(shortnames = True)
101
    using_options(shortnames = True)
102
    using_table_options(mysql_engine = "InnoDB")
102
    using_table_options(mysql_engine = "InnoDB")
103
 
103
 
-
 
104
class AgentWarehouseMapping(Entity):
-
 
105
    agentId = Field(Integer, primary_key=True)
-
 
106
    warehouseId = Field(Integer, primary_key=True)
-
 
107
    using_options(shortnames = True)
-
 
108
    using_table_options(mysql_engine = "InnoDB")
-
 
109
 
104
def initialize(dbname='helper', db_hostname='localhost'):
110
def initialize(dbname='helper', db_hostname='localhost'):
105
    #metadata.bind = "sqlite:///message.sqlite" #need to read it from configserver.
111
    #metadata.bind = "sqlite:///message.sqlite" #need to read it from configserver.
106
    engine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
112
    engine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
107
    metadata.bind = engine
113
    metadata.bind = engine
108
    metadata.bind.echo = True
114
    metadata.bind.echo = True