Skip to content

Instantly share code, notes, and snippets.

@mlebkowski
Created March 27, 2014 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlebkowski/9803907 to your computer and use it in GitHub Desktop.
Save mlebkowski/9803907 to your computer and use it in GitHub Desktop.
DROP TABLE IF EXISTS `address_service_copy`;
DROP TABLE IF EXISTS `address_service_temp2`;
ALTER TABLE `crm_gratis_commercial` CHANGE `trader_id` `trader_id` INTEGER(10) NOT NULL;
ALTER TABLE `disease_section` ADD CONSTRAINT `disease_section_FK_1`
FOREIGN KEY (`disease_id`)
REFERENCES `disease` (`id`);
CREATE INDEX `disease_id` ON `disease_specialization` (`disease_id`);
ALTER TABLE `disease_specialization` ADD CONSTRAINT `disease_specialization_FK_1`
FOREIGN KEY (`specialization_id`)
REFERENCES `specialization` (`id`);
ALTER TABLE `disease_specialization` ADD CONSTRAINT `disease_specialization_FK_2`
FOREIGN KEY (`disease_id`)
REFERENCES `disease` (`id`);
DROP INDEX `lon_lat_id` ON `facility_address`;
ALTER TABLE `facility_address` DROP `display_name`; -- to moje, zapomniałem dodać dropa po syncu, my bad!
ALTER TABLE `facility_address` DROP `lon`;
CREATE INDEX `lon_lat_id` ON `facility_address` (`lng`,`lat`,`id`);
ALTER TABLE `opinion` DROP `plus`;
ALTER TABLE `opinion` DROP `minus`;
ALTER TABLE `opinion_filter` CHANGE `used_filters` `used_filters` VARCHAR(100) NOT NULL;
ALTER TABLE `opinion_moderate` CHANGE `is_for_later` `is_for_later` TINYINT DEFAULT 0 NOT NULL;
ALTER TABLE `opinion_moderate` CHANGE `is_duplicate` `is_duplicate` TINYINT DEFAULT 0 NOT NULL;
ALTER TABLE `opinion_moderate` CHANGE `is_for_change` `is_for_change` TINYINT DEFAULT 0 NOT NULL;
ALTER TABLE `opinion_moderate` ADD CONSTRAINT `opinion_moderate_ibfk_2`
FOREIGN KEY (`id`)
REFERENCES `opinion` (`id`)
ON UPDATE CASCADE
ON DELETE CASCADE;
CREATE UNIQUE INDEX `opinion_id` ON `opinion_more_info` (`opinion_id`);
ALTER TABLE `opinion_more_info` ADD CONSTRAINT `opinion_more_info_ibfk_1`
FOREIGN KEY (`opinion_id`)
REFERENCES `opinion` (`id`)
ON UPDATE CASCADE
ON DELETE CASCADE;
DROP INDEX `opinion_id` ON `opinion_user_info`;
CREATE UNIQUE INDEX `opinion_id` ON `opinion_user_info` (`opinion_id`);
ALTER TABLE `package_price` CHANGE `short_name` `short_name` enum('silver_12','silver_6','gold_6','gold_12','ec_silver','ec_gold','cpl_12','ppp_12','pps_12','ppg_12','ppp_6','pps_6','ppg_6');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment