Subversion Repositories SmartDukaan

Rev

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

Rev 6241 Rev 6255
Line 133... Line 133...
133
    maxVal = Field(Integer, primary_key=True)
133
    maxVal = Field(Integer, primary_key=True)
134
    vatPercent = Field(Float)
134
    vatPercent = Field(Float)
135
    using_options(shortnames=True)
135
    using_options(shortnames=True)
136
    using_table_options(mysql_engine="InnoDB")
136
    using_table_options(mysql_engine="InnoDB")
137
 
137
 
-
 
138
class OOSTracker(Entity):
-
 
139
    itemId = Field(Integer, primary_key=True)
-
 
140
    using_options(shortnames=True)
-
 
141
    using_table_options(mysql_engine="InnoDB")
-
 
142
        
138
def initialize(dbname='catalog', db_hostname="localhost"):
143
def initialize(dbname='catalog', db_hostname="localhost"):
139
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
144
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
140
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
145
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
141
    engine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
146
    engine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
142
    metadata.bind = engine
147
    metadata.bind = engine