Subversion Repositories SmartDukaan

Rev

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

Rev 4649 Rev 4748
Line 223... Line 223...
223
    username = Field(String(30))
223
    username = Field(String(30))
224
    reason = Field(Text)
224
    reason = Field(Text)
225
    using_options(shortnames=True)
225
    using_options(shortnames=True)
226
    using_table_options(mysql_engine="InnoDB")
226
    using_table_options(mysql_engine="InnoDB")
227
 
227
 
-
 
228
class MissingItemKey(Entity):
-
 
229
    id = Field(Integer, primary_key=True, autoincrement=True)
-
 
230
    itemKey = Field(String(200))
-
 
231
    warehouseId = Field(Integer)
-
 
232
    using_options(shortnames=True)
-
 
233
    using_table_options(mysql_engine="InnoDB")
-
 
234
 
228
def initialize(dbname='catalog', db_hostname="localhost"):
235
def initialize(dbname='catalog', db_hostname="localhost"):
229
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
236
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
230
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
237
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
231
    engine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
238
    engine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
232
    metadata.bind = engine
239
    metadata.bind = engine