How Can We Help?
< All Topics
Print

Wyczyszczenie bazy

Często po fazie testowej zachodzi konieczność wyczyszczenia tabel w bazie. Oto polecenie MySQL dla standardowej bazy

DELETE FROM `address_book`;

DELETE FROM `banners`;

DELETE FROM `banners_history`;

DELETE FROM `categories`;

DELETE FROM `categories_description`;

DELETE FROM `counter`;

DELETE FROM `customers`;

DELETE FROM `customers_basket`;

DELETE FROM `customers_info`;

DELETE FROM `manufacturers`;

DELETE FROM `manufacturers_info`;

DELETE FROM `orders`;

DELETE FROM `orders_products`;

DELETE FROM `orders_status_history`;

DELETE FROM `orders_total`;

DELETE FROM `products`;

DELETE FROM `products_attributes`;

DELETE FROM `products_attributes_download`;

DELETE FROM `products_description`;

DELETE FROM `products_notifications`;

DELETE FROM `products_options`;

DELETE FROM `products_options_values`;

DELETE FROM `products_options_values_to_products_options`;

DELETE FROM `products_to_categories`;

DELETE FROM `reviews`;

DELETE FROM `reviews_description`;

DELETE FROM `sessions`;

DELETE FROM `specials`;

DELETE FROM `whos_online`;

ALTER TABLE banners =1;

ALTER TABLE banners_history =1;

ALTER TABLE categories =1;

ALTER TABLE customers =1;

ALTER TABLE customers_basket =1;

ALTER TABLE customers_basket_attributes =1;

ALTER TABLE manufacturers =1;

ALTER TABLE manufacturers_info =1;

ALTER TABLE orders =1;

ALTER TABLE orders_products =1;

ALTER TABLE orders_status_history =1;

ALTER TABLE orders_total =1;

ALTER TABLE products =1;

ALTER TABLE products_attributes =1;

ALTER TABLE products_description =1;

 

ALTER TABLE products_options_values_to_products_options

=1;

ALTER TABLE reviews =1;

ALTER TABLE specials =1;


W mojej bazie nie chcę wyczyścić banerów i kontrahentów , chcę natomiast wyczyścić tabele tw z OSCGT

DELETE FROM `categories`;

DELETE FROM `categories_description`;

DELETE FROM `counter`;

DELETE FROM `customers_basket`;

DELETE FROM `customers_info`;

DELETE FROM `manufacturers`;

DELETE FROM `manufacturers_info`;

DELETE FROM `orders`;

DELETE FROM `orders_products`;

DELETE FROM `orders_status_history`;

DELETE FROM `orders_total`;

DELETE FROM `products`;

DELETE FROM `products_attributes`;

DELETE FROM `products_attributes_download`;

DELETE FROM `products_description`;

DELETE FROM `products_notifications`;

DELETE FROM `products_options`;

DELETE FROM `products_options_values`;

DELETE FROM `products_options_values_to_products_options`;

DELETE FROM `products_to_categories`;

DELETE FROM `reviews`;

DELETE FROM `reviews_description`;

DELETE FROM `sessions`;

DELETE FROM `specials`;

DELETE FROM `whos_online`;

DELETE FROM `tw_towar`;

DELETE FROM `tw_zdjecie`;

DELETE FROM `tw_kategoria`;

DELETE FROM `tw_producent`;

ALTER TABLE categories = 1;

ALTER TABLE customers_basket = 1;

ALTER TABLE customers_basket_attributes = 1;

ALTER TABLE manufacturers = 1;

ALTER TABLE manufacturers_info = 1;

ALTER TABLE orders = 1;

ALTER TABLE orders_products = 1;

ALTER TABLE orders_status_history = 1;

ALTER TABLE orders_total = 1;

ALTER TABLE products = 1;

ALTER TABLE products_attributes = 1;

ALTER TABLE products_description = 1;

ALTER TABLE products_options_values_to_products_options = 1;

ALTER TABLE reviews = 1;

ALTER TABLE specials = 1;

Jednak GT będzie nam robiło jeszcze pewne problemy. Należy w InsertGT wyczyścić tabele

thw_zmiany_towar oraz thw_zmiany_zdjecie

Następnie w tabeli inserta tw_towar przy wszystkich towarach odznaczyć pozycja do sklepu internetowego , potem wykonać synchronizację , zanaczyć z powrotem interesujące nas towary i ponownie wykonać synchornizację.

 

Table of Contents