PRAGMA legacy_file_format=ON; CREATE TABLE if not exists product_search ( 'range' varchar(255) default NULL, 'name' varchar(255) default NULL, 'colour' varchar(50) default NULL, 'url' varchar(255) default NULL, 'price' decimal(8,2) default NULL, 'dimensions' varchar(255) default NULL, 'weight' varchar(255) default NULL, 'product_type' varchar(255) default NULL, 'supplier_code' varchar(25) default NULL, 'supplier_id' int(11) default NULL, 'barcode' varchar(16) not null ) ; create index if not exists 'name' on product_search('name'); create index if not exists 'supplier_code' on product_search ('supplier_code'); create index if not exists 'price' on product_search ('price'); create index if not exists 'product_type' on product_search ('product_type'); create index if not exists 'weight' on product_search ('weight'); create index if not exists 'barcode' on product_search ('barcode'); begin transaction; delete from product_search; commit transaction;