-- SQL script to add extra fields from gardoo.sql to ahsub.sql

-- accounts table
ALTER TABLE `ngaugeportal-ahshub`.`accounts`
  ADD COLUMN `language` varchar(10) NOT NULL DEFAULT 'en' COMMENT 'language',
  ADD COLUMN `created_by` binary(36) DEFAULT NULL COMMENT 'Created By',
  ADD COLUMN `updated_by` binary(36) DEFAULT NULL COMMENT 'Updated By',
  ADD COLUMN `deleted_by` binary(36) DEFAULT NULL COMMENT 'Deleted By',
  ADD COLUMN `relatedid` binary(36) DEFAULT NULL COMMENT 'Related ID',
  ADD COLUMN `centerid` binary(36) DEFAULT NULL COMMENT 'Center ID',
  ADD COLUMN `address` binary(36) DEFAULT NULL,
  ADD COLUMN `created_at` int(11) DEFAULT NULL COMMENT 'Created At',
  ADD COLUMN `updated_at` int(11) DEFAULT NULL COMMENT 'Updated At',
  ADD COLUMN `deleted_at` int(11) DEFAULT NULL COMMENT 'Deleted At',
  ADD COLUMN `price_number` int(11) DEFAULT NULL,
  ADD COLUMN `intid` int(11) DEFAULT NULL,
  ADD COLUMN `status` varchar(255) DEFAULT NULL COMMENT 'Status',
  ADD COLUMN `name` varchar(255) DEFAULT NULL,
  ADD COLUMN `account_code` varchar(255) DEFAULT NULL,
  ADD COLUMN `account_group` varchar(255) DEFAULT NULL,
  ADD COLUMN `email` varchar(255) DEFAULT NULL,
  ADD COLUMN `web_email` varchar(255) DEFAULT NULL,
  ADD COLUMN `stop` bit(1) DEFAULT NULL,
  ADD COLUMN `web_stop` bit(1) DEFAULT NULL,
  ADD COLUMN `web_client` bit(1) DEFAULT NULL,
  ADD COLUMN `minfreedelivery` decimal(19,4) DEFAULT NULL,
  ADD COLUMN `deliverysupplement` decimal(19,4) DEFAULT NULL,
  ADD COLUMN `createdby_name` varchar(255) DEFAULT NULL COMMENT 'Created By Name',
  ADD COLUMN `updatedby_name` varchar(255) DEFAULT NULL COMMENT 'Updated By Name',
  ADD COLUMN `deletedby_name` varchar(255) DEFAULT NULL COMMENT 'Deleted By Name',
  ADD COLUMN `type` varchar(255) DEFAULT NULL;

-- address table
ALTER TABLE `ngaugeportal-ahshub`.`address`
  ADD COLUMN `language` varchar(10) NOT NULL DEFAULT 'en' COMMENT 'language',
  ADD COLUMN `created_by` binary(36) DEFAULT NULL COMMENT 'Created By',
  ADD COLUMN `updated_by` binary(36) DEFAULT NULL COMMENT 'Updated By',
  ADD COLUMN `deleted_by` binary(36) DEFAULT NULL COMMENT 'Deleted By',
  ADD COLUMN `relatedid` binary(36) DEFAULT NULL COMMENT 'Related ID',
  ADD COLUMN `centerid` binary(36) DEFAULT NULL COMMENT 'Center ID',
  ADD COLUMN `accountid` binary(36) DEFAULT NULL,
  ADD COLUMN `created_at` int(11) DEFAULT NULL COMMENT 'Created At',
  ADD COLUMN `updated_at` int(11) DEFAULT NULL COMMENT 'Updated At',
  ADD COLUMN `deleted_at` int(11) DEFAULT NULL COMMENT 'Deleted At',
  ADD COLUMN `status` varchar(255) DEFAULT NULL COMMENT 'Status',
  ADD COLUMN `name` varchar(255) DEFAULT NULL,
  ADD COLUMN `companyname` varchar(255) DEFAULT NULL,
  ADD COLUMN `address1` varchar(255) DEFAULT NULL,
  ADD COLUMN `address2` varchar(255) DEFAULT NULL,
  ADD COLUMN `address3` varchar(255) DEFAULT NULL,
  ADD COLUMN `town` varchar(255) DEFAULT NULL,
  ADD COLUMN `county` varchar(255) DEFAULT NULL,
  ADD COLUMN `postcode` varchar(255) DEFAULT NULL,
  ADD COLUMN `contact` varchar(255) DEFAULT NULL,
  ADD COLUMN `email` varchar(255) DEFAULT NULL,
  ADD COLUMN `country` varchar(255) DEFAULT NULL,
  ADD COLUMN `lat` varchar(255) DEFAULT NULL,
  ADD COLUMN `long` varchar(255) DEFAULT NULL,
  ADD COLUMN `type` mediumtext DEFAULT NULL,
  ADD COLUMN `rate` varchar(10) DEFAULT NULL,
  ADD COLUMN `telephone` varchar(50) DEFAULT NULL,
  ADD COLUMN `mobile` varchar(20) DEFAULT NULL,
  ADD COLUMN `fax` varchar(20) DEFAULT NULL,
  ADD COLUMN `createdby_name` varchar(255) DEFAULT NULL COMMENT 'Created By Name',
  ADD COLUMN `updatedby_name` varchar(255) DEFAULT NULL COMMENT 'Updated By Name',
  ADD COLUMN `deletedby_name` varchar(255) DEFAULT NULL COMMENT 'Deleted By Name',
  ADD COLUMN `contact_email` tinyint(1) DEFAULT 1 COMMENT '"1"=>"Use contact email","0"=>"do not use contact email"';

-- assets table
ALTER TABLE `ngaugeportal-ahshub`.`assets`
  ADD COLUMN `type` varchar(50) DEFAULT NULL,
  ADD COLUMN `createdby_name` varchar(255) DEFAULT NULL COMMENT 'Created By Name',
  ADD COLUMN `updatedby_name` varchar(255) DEFAULT NULL COMMENT 'Updated By Name',
  ADD COLUMN `deletedby_name` varchar(255) DEFAULT NULL COMMENT 'Deleted By Name';

-- attributes table
ALTER TABLE `ngaugeportal-ahshub`.`attributes`
  ADD COLUMN `type` binary(36) DEFAULT NULL,
  ADD COLUMN `comment` mediumtext DEFAULT NULL,
  ADD COLUMN `createdby_name` varchar(255) DEFAULT NULL COMMENT 'Created By Name',
  ADD COLUMN `updatedby_name` varchar(255) DEFAULT NULL COMMENT 'Updated By Name',
  ADD COLUMN `deletedby_name` varchar(255) DEFAULT NULL COMMENT 'Deleted By Name';

-- attribute_set table
ALTER TABLE `ngaugeportal-ahshub`.`attribute_set`
  ADD COLUMN `description` mediumtext DEFAULT NULL,
  ADD COLUMN `createdby_name` varchar(255) DEFAULT NULL COMMENT 'Created By Name',
  ADD COLUMN `updatedby_name` varchar(255) DEFAULT NULL COMMENT 'Updated By Name',
  ADD COLUMN `deletedby_name` varchar(255) DEFAULT NULL COMMENT 'Deleted By Name';

-- attribute_types table
ALTER TABLE `ngaugeportal-ahshub`.`attribute_types`
  ADD COLUMN `length` int(11) DEFAULT NULL,
  ADD COLUMN `createdby_name` varchar(255) DEFAULT NULL COMMENT 'Created By Name',
  ADD COLUMN `updatedby_name` varchar(255) DEFAULT NULL COMMENT 'Updated By Name',
  ADD COLUMN `deletedby_name` varchar(255) DEFAULT NULL COMMENT 'Deleted By Name';

-- attribute_values table
ALTER TABLE `ngaugeportal-ahshub`.`attribute_values`
  ADD COLUMN `tooltip` mediumtext DEFAULT NULL,
  ADD COLUMN `createdby_name` varchar(255) DEFAULT NULL COMMENT 'Created By Name',
  ADD COLUMN `updatedby_name` varchar(255) DEFAULT NULL COMMENT 'Updated By Name',
  ADD COLUMN `deletedby_name` varchar(255) DEFAULT NULL COMMENT 'Deleted By Name';

-- attrib_values table
ALTER TABLE `ngaugeportal-ahshub`.`attrib_values`
  ADD COLUMN `relatedto` varchar(50) DEFAULT NULL,
  ADD COLUMN `datetime` datetime DEFAULT NULL,
  ADD COLUMN `value` mediumtext DEFAULT NULL,
  ADD COLUMN `decimal` decimal(10,0) DEFAULT NULL,
  ADD COLUMN `createdby_name` varchar(255) DEFAULT NULL COMMENT 'Created By Name',
  ADD COLUMN `updatedby_name` varchar(255) DEFAULT NULL COMMENT 'Updated By Name',
  ADD COLUMN `deletedby_name` varchar(255) DEFAULT NULL COMMENT 'Deleted By Name';

-- attsetlookup table
ALTER TABLE `ngaugeportal-ahshub`.`attsetlookup`
  ADD COLUMN `createdby_name` varchar(255) DEFAULT NULL COMMENT 'Created By Name',
  ADD COLUMN `updatedby_name` varchar(255) DEFAULT NULL COMMENT 'Updated By Name',
  ADD COLUMN `deletedby_name` varchar(255) DEFAULT NULL COMMENT 'Deleted By Name';

-- basket table
ALTER TABLE `ngaugeportal-ahshub`.`basket`
  ADD COLUMN `companyname` varchar(255) DEFAULT NULL,
  ADD COLUMN `courier` varchar(255) DEFAULT NULL,
  ADD COLUMN `shippingmethod` varchar(255) DEFAULT NULL,
  ADD COLUMN `country` varchar(255) DEFAULT NULL COMMENT 'Country',
  ADD COLUMN `sourceurl` varchar(255) DEFAULT NULL COMMENT 'Source Url',
  ADD COLUMN `createdby_name` varchar(255) DEFAULT NULL COMMENT 'Created By Name',
  ADD COLUMN `updatedby_name` varchar(255) DEFAULT NULL COMMENT 'Updated By Name',
  ADD COLUMN `deletedby_name` varchar(255) DEFAULT NULL COMMENT 'Deleted By Name';

-- basketlines table
ALTER TABLE `ngaugeportal-ahshub`.`basketlines`
  ADD COLUMN `createdby_name` varchar(255) DEFAULT NULL COMMENT 'Created By Name',
  ADD COLUMN `updatedby_name` varchar(255) DEFAULT NULL COMMENT 'Updated By Name',
  ADD COLUMN `deletedby_name` varchar(255) DEFAULT NULL COMMENT 'Deleted By Name';

-- categories table
ALTER TABLE `ngaugeportal-ahshub`.`categories`
  ADD COLUMN `mainimageid` binary(36) DEFAULT NULL COMMENT 'Main Image ID',
  ADD COLUMN `createdby_name` varchar(255) DEFAULT NULL COMMENT 'Created By Name',
  ADD COLUMN `updatedby_name` varchar(255) DEFAULT NULL COMMENT 'Updated By Name',
  ADD COLUMN `deletedby_name` varchar(255) DEFAULT NULL COMMENT 'Deleted By Name';

-- Add similar ALTER TABLE statements for all other tables as needed, following the pattern above.
