Subversion Repositories SmartDukaan

Rev

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

Rev 2841 Rev 3008
Line 182... Line 182...
182
    description = Field(String(200))
182
    description = Field(String(200))
183
    parent_category_id = Field(Integer)
183
    parent_category_id = Field(Integer)
184
    using_options(shortnames=True)
184
    using_options(shortnames=True)
185
    using_table_options(mysql_engine="InnoDB")
185
    using_table_options(mysql_engine="InnoDB")
186
 
186
 
-
 
187
class SimilarItems(Entity):
-
 
188
    item = ManyToOne('Item', primary_key=True)
-
 
189
    catalog_item_id = Field(Integer, primary_key=True, autoincrement=False)
-
 
190
    using_options(shortnames=True)
-
 
191
    using_table_options(mysql_engine="InnoDB")
-
 
192
 
187
    
193
    
188
def initialize(dbname='catalog'):
194
def initialize(dbname='catalog'):
189
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
195
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
190
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
196
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
191
    engine = create_engine('mysql://root:shop2020@localhost/' + dbname, pool_recycle=7200)
197
    engine = create_engine('mysql://root:shop2020@localhost/' + dbname, pool_recycle=7200)