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

Fixed aws_cloud.install

parent 1b4c1bb4
No related branches found
No related tags found
No related merge requests found
......@@ -189,7 +189,7 @@ function aws_cloud_schema() {
'primary key' => array('bundle_id'),
);
$schema[$aws_cloud_instances_table] = array(
'description' => t('EC2 Instances'),
'description' => t('AWS Instances'),
'fields' => array(
'instance_id' => array(
'type' => 'varchar',
......@@ -284,7 +284,7 @@ function aws_cloud_schema() {
);
$schema[$aws_cloud_images_table] = array(
'description' => t('EC2 Images'),
'description' => t('AWS Images'),
'fields' => array(
'image_id' => array(
'type' => 'varchar',
......@@ -339,7 +339,6 @@ function aws_cloud_schema() {
'length' => 64,
),
),
'primary key' => array('image_id'),
);
$schema[$aws_cloud_volumes_table] = array(
......@@ -448,7 +447,7 @@ function aws_cloud_schema() {
);
$schema[$aws_cloud_register_image_table] = array(
'description' => t('EC2 Instance Types'),
'description' => t('AWS Instance Types'),
'fields' => array(
'id' => array(
'type' => 'varchar',
......@@ -475,7 +474,7 @@ function aws_cloud_schema() {
);
$schema[$aws_cloud_security_groups_table] = array(
'description' => t('EC2 Security Groups'),
'description' => t('AWS Security Groups'),
'fields' => array(
'owner_id' => array(
'type' => 'varchar',
......@@ -487,7 +486,7 @@ function aws_cloud_schema() {
),
'group_name' => array(
'type' => 'varchar',
'length' => 64,
'length' => 255,
),
'group_id' => array(
'type' => 'varchar',
......@@ -495,22 +494,22 @@ function aws_cloud_schema() {
),
'group_description' => array(
'type' => 'varchar',
'length' => 64,
'length' => 255,
),
'permissions' => array(
'type' => 'varchar',
'length' => 1280,
),
),
'primary key' => array('owner_id', 'cloud_type', 'group_name'),
'primary key' => array('owner_id', 'cloud_type'),
);
$schema[$aws_cloud_security_groups_details_table] = array(
'description' => t('EC2 Security Groups Details Table'),
'description' => t('AWS Security Groups Details Table'),
'fields' => array(
'group_name' => array(
'type' => 'varchar',
'length' => 64,
'length' => 255,
),
'cloud_type' => array(
'type' => 'varchar',
......@@ -534,7 +533,7 @@ function aws_cloud_schema() {
),
'tgt_group_name' => array(
'type' => 'varchar',
'length' => 64,
'length' => 255,
),
'cidr_ip' => array(
'type' => 'varchar',
......@@ -544,7 +543,7 @@ function aws_cloud_schema() {
);
$schema[$aws_cloud_snapshot_table] = array(
'description' => t('EC2 Snapshot'),
'description' => t('AWS Snapshot'),
'fields' => array(
'snapshot_id' => array(
'type' => 'varchar',
......@@ -591,7 +590,7 @@ function aws_cloud_schema() {
);
$schema[$aws_cloud_ssh_keys_table] = array(
'description' => t('EC2 SSH Keys'),
'description' => t('AWS SSH Keys'),
'fields' => array(
'key_name' => array(
'type' => 'varchar',
......@@ -674,24 +673,24 @@ function aws_cloud_update_7100() {
* Alter instance_id column from 16 to 64 in instance, volume, elastic_ip, instances_lock
*/
function aws_cloud_update_7101() {
$aws_cloud_instances_table = aws_cloud_get_table_info(AWS_CLOUD_INSTANCES_TABLE);
$aws_cloud_instances_lock_table = aws_cloud_get_table_info(AWS_CLOUD_INSTANCES_LOCK_TABLE);
$aws_cloud_elastic_ip_table = aws_cloud_get_table_info(AWS_CLOUD_ELASTIC_IP_TABLE);
$aws_cloud_volumes_table = aws_cloud_get_table_info(AWS_CLOUD_EBS_VOLUMES_TABLE);
$aws_cloud_instances_table = aws_cloud_get_table_info(AWS_CLOUD_INSTANCES_TABLE );
$aws_cloud_instances_lock_table = aws_cloud_get_table_info(AWS_CLOUD_INSTANCES_LOCK_TABLE );
$aws_cloud_elastic_ip_table = aws_cloud_get_table_info(AWS_CLOUD_ELASTIC_IP_TABLE );
$aws_cloud_volumes_table = aws_cloud_get_table_info(AWS_CLOUD_EBS_VOLUMES_TABLE );
$aws_cloud_security_groups_table = aws_cloud_get_table_info(AWS_CLOUD_SECURITY_GROUPS_TABLE);
$aws_cloud_snapshot_table = aws_cloud_get_table_info(AWS_CLOUD_SNAPSHOTS_TABLE);
$aws_cloud_snapshot_table = aws_cloud_get_table_info(AWS_CLOUD_SNAPSHOTS_TABLE );
$new_field = array(
'type' => 'varchar',
'length' => 64,
);
db_change_field($aws_cloud_instances_table, 'instance_id', 'instance_id', $new_field);
db_change_field($aws_cloud_instances_lock_table, 'instance_id', 'instance_id', $new_field);
db_change_field($aws_cloud_elastic_ip_table, 'instance_id', 'instance_id', $new_field);
db_change_field($aws_cloud_volumes_table, 'instance_id', 'instance_id', $new_field);
db_change_field($aws_cloud_security_groups_table, 'owner_id', 'owner_id', $new_field);
db_change_field($aws_cloud_snapshot_table, 'owner_id', 'owner_id', $new_field);
db_change_field($aws_cloud_instances_table , 'instance_id', 'instance_id', $new_field);
db_change_field($aws_cloud_instances_lock_table , 'instance_id', 'instance_id', $new_field);
db_change_field($aws_cloud_elastic_ip_table , 'instance_id', 'instance_id', $new_field);
db_change_field($aws_cloud_volumes_table , 'instance_id', 'instance_id', $new_field);
db_change_field($aws_cloud_security_groups_table, 'owner_id' , 'owner_id' , $new_field);
db_change_field($aws_cloud_snapshot_table , 'owner_id' , 'owner_id' , $new_field);
}
/**
......
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