mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-24 17:03:27 +03:00
Reverted invalid migration changes
This commit is contained in:
parent
5d8a35f120
commit
777dcb0d9e
3 changed files with 9 additions and 9 deletions
|
@ -232,7 +232,7 @@ class Migration_Specific_calendar_sync extends EA_Migration {
|
|||
]);
|
||||
$this->dbforge->add_key('id', TRUE);
|
||||
$this->dbforge->add_key('id_service_categories');
|
||||
$this->dbforge->create_table('Categories', TRUE, ['engine' => 'InnoDB']);
|
||||
$this->dbforge->create_table('service_categories', TRUE, ['engine' => 'InnoDB']);
|
||||
|
||||
$this->dbforge->add_field([
|
||||
'id' => [
|
||||
|
@ -395,7 +395,7 @@ class Migration_Specific_calendar_sync extends EA_Migration {
|
|||
|
||||
$this->db->query('
|
||||
ALTER TABLE `' . $this->db->dbprefix('services') . '`
|
||||
ADD CONSTRAINT `' . $this->db->dbprefix('services') . '_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `' . $this->db->dbprefix('Categories') . '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
ADD CONSTRAINT `' . $this->db->dbprefix('services') . '_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `' . $this->db->dbprefix('service_categories') . '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
');
|
||||
|
||||
$this->db->query('
|
||||
|
@ -494,7 +494,7 @@ class Migration_Specific_calendar_sync extends EA_Migration {
|
|||
$this->dbforge->drop_table('roles');
|
||||
$this->dbforge->drop_table('secretaries_providers');
|
||||
$this->dbforge->drop_table('services');
|
||||
$this->dbforge->drop_table('Categories');
|
||||
$this->dbforge->drop_table('service_categories');
|
||||
$this->dbforge->drop_table('services_providers');
|
||||
$this->dbforge->drop_table('settings');
|
||||
$this->dbforge->drop_table('user_settings');
|
||||
|
|
|
@ -157,7 +157,7 @@ class Migration_Change_column_types extends EA_Migration {
|
|||
]
|
||||
];
|
||||
|
||||
$this->dbforge->modify_column('Categories', $fields);
|
||||
$this->dbforge->modify_column('service_categories', $fields);
|
||||
|
||||
// Settings
|
||||
$fields = [
|
||||
|
@ -210,7 +210,7 @@ class Migration_Change_column_types extends EA_Migration {
|
|||
ADD CONSTRAINT `fk_' . $this->db->dbprefix('secretaries_providers') . '_2` FOREIGN KEY (`id_users_provider`) REFERENCES `' . $this->db->dbprefix('users') . '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `' . $this->db->dbprefix('services') . '`
|
||||
ADD CONSTRAINT `' . $this->db->dbprefix('services') . '_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `' . $this->db->dbprefix('Categories') . '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE');
|
||||
ADD CONSTRAINT `' . $this->db->dbprefix('services') . '_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `' . $this->db->dbprefix('service_categories') . '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `' . $this->db->dbprefix('services_providers') . '`
|
||||
ADD CONSTRAINT `' . $this->db->dbprefix('services_providers') . '_ibfk_1` FOREIGN KEY (`id_users`) REFERENCES `' . $this->db->dbprefix('users') . '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
|
@ -371,7 +371,7 @@ class Migration_Change_column_types extends EA_Migration {
|
|||
]
|
||||
];
|
||||
|
||||
$this->dbforge->modify_column('Categories', $fields);
|
||||
$this->dbforge->modify_column('service_categories', $fields);
|
||||
|
||||
// Settings
|
||||
$fields = [
|
||||
|
@ -424,7 +424,7 @@ class Migration_Change_column_types extends EA_Migration {
|
|||
ADD CONSTRAINT `fk_' . $this->db->dbprefix('secretaries_providers') . '_2` FOREIGN KEY (`id_users_provider`) REFERENCES `' . $this->db->dbprefix('users') . '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `' . $this->db->dbprefix('services') . '`
|
||||
ADD CONSTRAINT `' . $this->db->dbprefix('services') . '_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `' . $this->db->dbprefix('Categories') . '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE');
|
||||
ADD CONSTRAINT `' . $this->db->dbprefix('services') . '_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `' . $this->db->dbprefix('service_categories') . '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `' . $this->db->dbprefix('services_providers') . '`
|
||||
ADD CONSTRAINT `' . $this->db->dbprefix('services_providers') . '_ibfk_1` FOREIGN KEY (`id_users`) REFERENCES `' . $this->db->dbprefix('users') . '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
|
|
|
@ -50,7 +50,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration {
|
|||
ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `' . $this->db->dbprefix('services') . '`
|
||||
ADD CONSTRAINT `services_service_categories` FOREIGN KEY (`id_service_categories`) REFERENCES `' . $this->db->dbprefix('Categories') . '` (`id`)
|
||||
ADD CONSTRAINT `services_service_categories` FOREIGN KEY (`id_service_categories`) REFERENCES `' . $this->db->dbprefix('service_categories') . '` (`id`)
|
||||
ON DELETE SET NULL
|
||||
ON UPDATE CASCADE');
|
||||
|
||||
|
@ -101,7 +101,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration {
|
|||
ADD CONSTRAINT `fk_' . $this->db->dbprefix('secretaries_providers') . '_2` FOREIGN KEY (`id_users_provider`) REFERENCES `' . $this->db->dbprefix('users') . '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `' . $this->db->dbprefix('services') . '`
|
||||
ADD CONSTRAINT `' . $this->db->dbprefix('services') . '_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `' . $this->db->dbprefix('Categories') . '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE');
|
||||
ADD CONSTRAINT `' . $this->db->dbprefix('services') . '_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `' . $this->db->dbprefix('service_categories') . '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE');
|
||||
|
||||
$this->db->query('ALTER TABLE `' . $this->db->dbprefix('services_providers') . '`
|
||||
ADD CONSTRAINT `' . $this->db->dbprefix('services_providers') . '_ibfk_1` FOREIGN KEY (`id_users`) REFERENCES `' . $this->db->dbprefix('users') . '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
|
|
Loading…
Reference in a new issue