| Line 82... |
Line 82... |
| 82 |
warehouse_location = Field(Integer, primary_key=True, autoincrement=False)
|
82 |
warehouse_location = Field(Integer, primary_key=True, autoincrement=False)
|
| 83 |
provider_less_amount = ManyToOne("Provider")
|
83 |
provider_less_amount = ManyToOne("Provider")
|
| 84 |
provider_more_amount = ManyToOne("Provider")
|
84 |
provider_more_amount = ManyToOne("Provider")
|
| 85 |
using_options(shortnames=True)
|
85 |
using_options(shortnames=True)
|
| 86 |
using_table_options(mysql_engine="InnoDB")
|
86 |
using_table_options(mysql_engine="InnoDB")
|
| - |
|
87 |
|
| - |
|
88 |
class PublicHolidays(Entity):
|
| - |
|
89 |
date = Field(Date, primary_key=True)
|
| - |
|
90 |
occasion = Field(String(100))
|
| - |
|
91 |
using_options(shortnames=True)
|
| - |
|
92 |
using_table_options(mysql_engine="InnoDB")
|
| 87 |
|
93 |
|
| 88 |
def initialize(dbname="logistics"):
|
94 |
def initialize(dbname="logistics"):
|
| 89 |
#metadata.bind = "sqlite:///logistics.sqlite" #need to read it from configserver.
|
95 |
#metadata.bind = "sqlite:///logistics.sqlite" #need to read it from configserver.
|
| 90 |
engine = create_engine('mysql://root:shop2020@localhost/' + dbname, pool_recycle=7200)
|
96 |
engine = create_engine('mysql://root:shop2020@localhost/' + dbname, pool_recycle=7200)
|
| 91 |
metadata.bind = engine
|
97 |
metadata.bind = engine
|