 -- Constraints for table `my_shops`
 --
 ALTER TABLE `my_shops`
-  ADD CONSTRAINT `my_shops_shop_id_foreign` FOREIGN KEY (`shop_id`) REFERENCES `rental_shops` (`shop_id`) ON DELETE CASCADE,
-  ADD CONSTRAINT `my_shops_lessee_id_foreign` FOREIGN KEY (`lessee_id`) REFERENCES `lessees` (`lessee_id`) ON DELETE CASCADE;
+  ADD CONSTRAINT `my_shops_lessee_id_foreign` FOREIGN KEY (`lessee_id`) REFERENCES `lessees` (`lessee_id`) ON DELETE CASCADE,
+  ADD CONSTRAINT `my_shops_shop_id_foreign` FOREIGN KEY (`shop_id`) REFERENCES `rental_shops` (`shop_id`) ON DELETE CASCADE;
 
 --
 -- Constraints for table `rental_payments`

  `shop_branch` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `latitude` decimal(10,2) NOT NULL,
  `longitude` decimal(10,2) NOT NULL,
  `subscriber_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`shop_id`),
  KEY `rental_shops_subscriber_id_foreign` (`subscriber_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------


  `plan_desc` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `plan_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `plan_rate` double(12,2) NOT NULL,
  `plan_status` char(10) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`plan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

