Subversion Repositories SmartDukaan

Rev

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

Rev 8718 Rev 9404
Line 187... Line 187...
187
    item_id = Field(Integer, primary_key=True,autoincrement=False)
187
    item_id = Field(Integer, primary_key=True,autoincrement=False)
188
    availability = Field(Integer)
188
    availability = Field(Integer)
189
    using_options(shortnames=True)
189
    using_options(shortnames=True)
190
    using_table_options(mysql_engine="InnoDB")
190
    using_table_options(mysql_engine="InnoDB")
191
    
191
    
-
 
192
class SnapdealInventorySnapshot(Entity):
-
 
193
    item_id = Field(Integer, primary_key=True,autoincrement=False)
-
 
194
    availability = Field(Integer)
-
 
195
    lastUpdatedOnSnapdeal = Field(DateTime)
-
 
196
    using_options(shortnames=True)
-
 
197
    using_table_options(mysql_engine="InnoDB")
192
    
198
    
193
def initialize(dbname='inventory', db_hostname="localhost"):
199
def initialize(dbname='inventory', db_hostname="localhost"):
194
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
200
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
195
    #metadata.bind = 'mysql://root:shop2020@localhost/inventory'
201
    #metadata.bind = 'mysql://root:shop2020@localhost/inventory'
196
    iengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
202
    iengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)