1919-- Schema upgrade from 4.5.1 to 4.5.2;
2020-- ;
2121
22- -- SAML
22+ UPDATE IGNORE ` cloud` .` configuration` SET ` default_value` = ' PBKDF2,SHA256SALT,MD5,LDAP,SAML2,PLAINTEXT' WHERE name= ' user.authenticators.order' ;
23+ UPDATE IGNORE ` cloud` .` configuration` SET ` value` = ' PBKDF2,SHA256SALT,MD5,LDAP,SAML2,PLAINTEXT' WHERE name= ' user.authenticators.order' ;
24+ UPDATE IGNORE ` cloud` .` configuration` SET ` default_value` = ' PBKDF2,SHA256SALT,MD5,LDAP,SAML2,PLAINTEXT' WHERE name= ' user.password.encoders.order' ;
25+ UPDATE IGNORE ` cloud` .` configuration` SET ` value` = ' PBKDF2,SHA256SALT,MD5,LDAP,SAML2,PLAINTEXT' WHERE name= ' user.password.encoders.order' ;
26+ UPDATE IGNORE ` cloud` .` configuration` SET ` value` = " MD5,LDAP,PLAINTEXT" WHERE ` name` = " user.password.encoders.exclude" ;
27+ ALTER TABLE ` cloud` .` user` ADD COLUMN ` source` varchar (40 ) NOT NULL DEFAULT ' UNKNOWN' ;
2328
24- DELETE FROM ` cloud` .` configuration` WHERE name like ' saml%' ;
25-
26- ALTER TABLE ` cloud` .` user` ADD COLUMN ` external_entity` text DEFAULT NULL COMMENT " reference to external federation entity" ;
27-
28- DROP TABLE IF EXISTS ` cloud` .` saml_token` ;
29- CREATE TABLE `cloud `.` saml_token` (
30- ` id` bigint unsigned NOT NULL AUTO_INCREMENT,
31- ` uuid` varchar (255 ) UNIQUE NOT NULL COMMENT ' The Authn Unique Id' ,
32- ` domain_id` bigint unsigned DEFAULT NULL ,
33- ` entity` text NOT NULL COMMENT ' Identity Provider Entity Id' ,
34- ` created` DATETIME NOT NULL ,
35- PRIMARY KEY (` id` ),
36- CONSTRAINT ` fk_saml_token__domain_id` FOREIGN KEY (` domain_id` ) REFERENCES ` domain` (` id` ) ON DELETE CASCADE
37- ) ENGINE= InnoDB DEFAULT CHARSET= utf8;
3829
3930-- Quota Configuration
4031
@@ -57,7 +48,7 @@ INSERT IGNORE INTO `cloud`.`configuration` (`category`, `instance`, `component`,
5748INSERT IGNORE INTO ` cloud` .` configuration` (` category` , ` instance` , ` component` , ` name` , ` value` , ` default_value` , ` description` ) VALUES (' Advanced' , ' DEFAULT' , ' QuotaService' , ' quota.usage.smtp.port' , ' ' , ' ' , ' SMTP port' );
5849INSERT IGNORE INTO ` cloud` .` configuration` (` category` , ` instance` , ` component` , ` name` , ` value` , ` default_value` , ` description` ) VALUES (' Advanced' , ' DEFAULT' , ' QuotaService' , ' quota.usage.smtp.useAuth' , ' ' , ' ' , ' SMTP Auth type' );
5950
60- CREATE TABLE `cloud `.` quota_configuration` (
51+ CREATE TABLE `cloud_usage `.` quota_configuration` (
6152 ` id` bigint unsigned NOT NULL auto_increment COMMENT ' id' ,
6253 ` usage_type` varchar (255 ) NOT NULL COMMENT ' usage type' ,
6354 ` usage_unit` varchar (255 ) NOT NULL COMMENT ' usage type' ,
@@ -69,15 +60,56 @@ CREATE TABLE `cloud`.`quota_configuration` (
6960) ENGINE= InnoDB DEFAULT CHARSET= utf8;
7061
7162
72- INSERT IGNORE INTO ` cloud` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' RUNNING_VM' , ' Compute-Hours' , ' ' , ' 5' , ' 1' , ' Quota mapping for running VM' );
73- INSERT IGNORE INTO ` cloud` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' ALLOCATED_VM' , ' Compute-Hours' , ' ' , ' 1' , ' 1' , ' Quota mapping for running VM' );
74- INSERT IGNORE INTO ` cloud` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' IP_ADDRESS' , ' IP-Hours' , ' ' , ' 0.1' , ' 1' , ' Quota mapping for running VM' );
75- INSERT IGNORE INTO ` cloud` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' NETWORK_BYTES_SENT' , ' GB' , ' ' , ' 1' , ' 1' , ' Quota mapping for running VM' );
76- INSERT IGNORE INTO ` cloud` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' NETWORK_BYTES_RECEIVED' , ' GB' , ' ' , ' 1' , ' 1' , ' Quota mapping for running VM' );
77- INSERT IGNORE INTO ` cloud` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' VOLUME' , ' GB-Month' , ' ' , ' 5' , ' 1' , ' Quota mapping for running VM' );
78- INSERT IGNORE INTO ` cloud` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' TEMPLATE' , ' GB-Month' , ' ' , ' 5' , ' 1' , ' Quota mapping for running VM' );
79- INSERT IGNORE INTO ` cloud` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' ISO' , ' GB-Month' , ' ' , ' 5' , ' 1' , ' Quota mapping for running VM' );
80- INSERT IGNORE INTO ` cloud` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' SNAPSHOT' , ' GB-Month' , ' ' , ' 5' , ' 1' , ' Quota mapping for running VM' );
81- INSERT IGNORE INTO ` cloud` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' LOAD_BALANCER_POLICY' , ' Policy-Hours' , ' ' , ' 5' , ' 0' , ' Quota mapping for running VM' );
82- INSERT IGNORE INTO ` cloud` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' PORT_FORWARDING_RULE' , ' Policy-Hours' , ' ' , ' 5' , ' 0' , ' Quota mapping for running VM' );
83- INSERT IGNORE INTO ` cloud` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' NETWORK_OFFERING' , ' Policy-Hours' , ' ' , ' 5' , ' 0' , ' Quota mapping for running VM' );
63+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' RUNNING_VM' , ' Compute-Hours' , ' ' , ' 5' , ' 1' , ' Quota mapping for running VM' );
64+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' ALLOCATED_VM' , ' Compute-Hours' , ' ' , ' 1' , ' 1' , ' Quota mapping for running VM' );
65+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' IP_ADDRESS' , ' IP-Hours' , ' ' , ' 0.1' , ' 1' , ' Quota mapping for running VM' );
66+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' NETWORK_BYTES_SENT' , ' GB' , ' ' , ' 1' , ' 1' , ' Quota mapping for running VM' );
67+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' NETWORK_BYTES_RECEIVED' , ' GB' , ' ' , ' 1' , ' 1' , ' Quota mapping for running VM' );
68+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' VOLUME' , ' GB-Month' , ' ' , ' 5' , ' 1' , ' Quota mapping for running VM' );
69+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' TEMPLATE' , ' GB-Month' , ' ' , ' 5' , ' 1' , ' Quota mapping for running VM' );
70+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' ISO' , ' GB-Month' , ' ' , ' 5' , ' 1' , ' Quota mapping for running VM' );
71+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' SNAPSHOT' , ' GB-Month' , ' ' , ' 5' , ' 1' , ' Quota mapping for running VM' );
72+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' LOAD_BALANCER_POLICY' , ' Policy-Hours' , ' ' , ' 5' , ' 0' , ' Quota mapping for running VM' );
73+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' PORT_FORWARDING_RULE' , ' Policy-Hours' , ' ' , ' 5' , ' 0' , ' Quota mapping for running VM' );
74+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' NETWORK_OFFERING' , ' Policy-Hours' , ' ' , ' 5' , ' 0' , ' Quota mapping for running VM' );
75+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' CPU' , ' Compute-Hours' , ' 100MHz' , ' 5' , ' 1' , ' Quota mapping for 100 MHz of CPU running for an hour' );
76+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' vCPU' , ' Compute-Hours' , ' 1VCPU' , ' 5' , ' 1' , ' Quota mapping for running VM that has 1vCPU' );
77+ INSERT IGNORE INTO ` cloud_usage` .` quota_configuration` (` usage_type` , ` usage_unit` , ` usage_discriminator` , ` currency_value` , ` include` , ` description` ) VALUES (' MEMORY' , ' Compute-Hours' , ' 1MB' , ' 5' , ' 1' , ' Quota mapping for usign 1MB or RAM for 1 hour' );
78+
79+
80+ CREATE TABLE `cloud_usage `.` quota_credits` (
81+ ` id` bigint unsigned NOT NULL auto_increment COMMENT ' id' ,
82+ ` account_id` bigint unsigned NOT NULL ,
83+ ` domain_id` bigint (20 ) unsigned NOT NULL ,
84+ ` credit` decimal (15 ,2 ) COMMENT ' amount credited' ,
85+ ` updated_on` datetime NOT NULL COMMENT ' date created' ,
86+ ` updated_by` bigint unsigned NOT NULL ,
87+ PRIMARY KEY (` id` )
88+ ) ENGINE= InnoDB DEFAULT CHARSET= utf8;
89+
90+
91+ CREATE TABLE ` cloud_usage.quota_email_templates` (
92+ ` id` bigint (20 ) NOT NULL AUTO_INCREMENT,
93+ ` template_name` varchar (64 ) DEFAULT NULL ,
94+ ` template_text` longtext,
95+ ` category` int (10 ) unsigned NOT NULL DEFAULT ' 0' ,
96+ ` last_updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
97+ ` locale` varchar (25 ) DEFAULT ' en_US' ,
98+ ` template_name_locale` varchar (74 ) DEFAULT NULL ,
99+ ` version` int (11 ) DEFAULT ' 0' ,
100+ PRIMARY KEY (` id` )
101+ ) ENGINE= InnoDB DEFAULT CHARSET= utf8;
102+
103+
104+ CREATE TABLE ` cloud_usage.quota_sent_emails` (
105+ ` id` bigint (20 ) NOT NULL AUTO_INCREMENT,
106+ ` from_address` varchar (1024 ) NOT NULL ,
107+ ` to_address` varchar (1024 ) NOT NULL ,
108+ ` cc_address` varchar (1024 ) DEFAULT NULL ,
109+ ` bcc_address` varchar (1024 ) DEFAULT NULL ,
110+ ` send_date` datetime NOT NULL ,
111+ ` subject` varchar (1024 ) NOT NULL ,
112+ ` mail_text` longtext NOT NULL ,
113+ ` version` int (11 ) DEFAULT ' 0' ,
114+ PRIMARY KEY (` id` )
115+ ) ENGINE= InnoDB DEFAULT CHARSET= utf8;
0 commit comments