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