feat(modefied)
This commit is contained in:
1 parent
d705f2f9d3
commit
e3110c3897
12 files changed
+237
-63
No files matched your search
@@ -13,7 +13,6 @@ def init_database(db_name='pipe_store.db'):
|
||||
description TEXT,
|
||||
parent_id INTEGER,
|
||||
image_path TEXT,
|
||||
page_number INTEGER DEFAULT 1, -- Новое поле: номер страницы для пагинации
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (parent_id) REFERENCES categories (id)
|
||||
)
|
||||
@@ -33,7 +32,6 @@ def init_database(db_name='pipe_store.db'):
|
||||
application_type TEXT, -- внутренняя/наружная
|
||||
stiffness_class TEXT, -- SN4, SN2 и т.д.
|
||||
image_path TEXT,
|
||||
page_number INTEGER DEFAULT 1, -- Новое поле: номер страницы для пагинации
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (category_id) REFERENCES categories (id)
|
||||
)
|
||||
@@ -63,8 +61,6 @@ def init_database(db_name='pipe_store.db'):
|
||||
cursor.execute('CREATE INDEX IF NOT EXISTS idx_products_category ON products(category_id)')
|
||||
cursor.execute('CREATE INDEX IF NOT EXISTS idx_products_diameter ON products(diameter)')
|
||||
cursor.execute('CREATE INDEX IF NOT EXISTS idx_products_length ON products(length)')
|
||||
cursor.execute('CREATE INDEX IF NOT EXISTS idx_products_page ON products(page_number)')
|
||||
cursor.execute('CREATE INDEX IF NOT EXISTS idx_categories_page ON categories(page_number)')
|
||||
cursor.execute('CREATE INDEX IF NOT EXISTS idx_product_filters_key_value ON product_filters(filter_key, value)')
|
||||
|
||||
conn.commit()
|
||||
|
||||
Reference in new issue
Block a user