Skip to content
Snippets Groups Projects
Commit 1b4c1bb4 authored by Yas Naoi's avatar Yas Naoi
Browse files

Remove all *primary keys*, *unique keys* and *index* from...

Remove all *primary keys*, *unique keys* and *index* from cloud_aws_security_groups and cloud_aws_security_groups_details table at aws_cloud.install
parent 078743f9
No related branches found
No related tags found
No related merge requests found
......@@ -715,3 +715,31 @@ function aws_cloud_update_7130() {
// Drop all unique keys
db_drop_unique_key($aws_cloud_images_table, 'image_id');
}
/**
* Remove primary keys, unique keys and index from cloud_aws_security_groups table
*/
function aws_cloud_update_7140() {
$aws_cloud_security_group_table = aws_cloud_get_table_info(AWS_CLOUD_SECURITY_GROUPS_TABLE);
// Drop all primary keys.
db_drop_primary_key($aws_cloud_security_group_table);
// Drop all index.
db_drop_index($aws_cloud_security_group_table, 'group_name');
// Drop all unique keys
db_drop_unique_key($aws_cloud_security_group_table, 'group_name');
// Change Column length
db_change_field($aws_cloud_security_group_table, 'group_name', 'group_name', array(
'type' => 'varchar',
'length' => 255,
));
db_change_field($aws_cloud_security_group_table, 'group_description', 'group_description', array(
'type' => 'varchar',
'length' => 255,
));
$aws_cloud_security_group_table = aws_cloud_get_table_info(AWS_CLOUD_SECURITY_GROUPS_DETAILS_TABLE);
db_change_field($aws_cloud_security_group_details_table, 'group_name', 'group_name', array(
'type' => 'varchar',
'length' => 255,
));
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment