Skip to content

Commit 16e8113

Browse files
committed
db: Fix developer's deploydb and cloud-setup-databases for rolling update
- Fix developer prefill to use 4.0's schema - Fix developer/pom.xml and cloud-setup-databases to not run create-schema-view, the upgrade path is configured to do a rolling update and set it up Signed-off-by: Rohit Yadav <[email protected]>
1 parent c63dbb8 commit 16e8113

3 files changed

Lines changed: 12 additions & 14 deletions

File tree

developer/developer-prefill.sql

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,25 @@
1818
-- Add a default ROOT domain
1919
use cloud;
2020

21-
INSERT INTO `cloud`.`domain` (id, uuid, name, parent, path, owner, region_id) VALUES
22-
(1, UUID(), 'ROOT', NULL, '/', 2, 1);
21+
INSERT INTO `cloud`.`domain` (id, uuid, name, parent, path, owner) VALUES
22+
(1, UUID(), 'ROOT', NULL, '/', 2);
2323

2424
-- Add system and admin accounts
25-
INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, state, region_id) VALUES
26-
(1, UUID(), 'system', 1, 1, 'enabled', 1);
25+
INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, state) VALUES
26+
(1, UUID(), 'system', 1, 1, 'enabled');
2727

28-
INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, state, region_id) VALUES
29-
(2, UUID(), 'admin', 1, 1, 'enabled', 1);
28+
INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, state) VALUES
29+
(2, UUID(), 'admin', 1, 1, 'enabled');
3030

3131
-- Add system user
3232
INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname,
33-
lastname, email, state, created, region_id) VALUES (1, UUID(), 'system', RAND(),
34-
'1', 'system', 'cloud', NULL, 'enabled', NOW(), 1);
33+
lastname, email, state, created) VALUES (1, UUID(), 'system', RAND(),
34+
'1', 'system', 'cloud', NULL, 'enabled', NOW());
3535

3636
-- Add system user with encrypted password=password
3737
INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname,
38-
lastname, email, state, created, region_id) VALUES (2, UUID(), 'admin', '5f4dcc3b5aa765d61d8327deb882cf99',
39-
'2', 'Admin', 'User', '[email protected]', 'enabled', NOW(), 1);
38+
lastname, email, state, created) VALUES (2, UUID(), 'admin', '5f4dcc3b5aa765d61d8327deb882cf99',
39+
'2', 'Admin', 'User', '[email protected]', 'enabled', NOW());
4040

4141
-- Add configurations
4242
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)

developer/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@
157157
<!-- Create default schema and db table views -->
158158
<argument>${basedir}/target/db/create-schema.sql</argument>
159159
<argument>${basedir}/target/db/create-schema-premium.sql</argument>
160-
<!-- Create schema view -->
161-
<argument>${basedir}/target/db/create-schema-view.sql</argument>
162160
<!-- Seed templates -->
163161
<argument>${basedir}/target/db/templates.sql</argument>
164162
<!-- Run cloudbridge related sqls -->

setup/bindir/cloud-setup-databases.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ for full help
211211
""),
212212
)
213213

214-
for f in ["create-database","create-schema", "create-database-premium","create-schema-premium", "create-schema-view"]:
214+
for f in ["create-database","create-schema", "create-database-premium","create-schema-premium"]:
215215
p = os.path.join(self.dbFilesPath,"%s.sql"%f)
216216
if not os.path.exists(p): continue
217217
text = file(p).read()
@@ -358,7 +358,7 @@ for example:
358358
if not os.path.exists(dbf):
359359
self.errorAndExit("Cannot find %s"%dbf)
360360

361-
coreSchemas = ['create-database.sql', 'create-schema.sql', 'create-schema-view.sql', 'templates.sql']
361+
coreSchemas = ['create-database.sql', 'create-schema.sql', 'templates.sql']
362362
if not self.serversetup:
363363
coreSchemas.append('server-setup.sql')
364364

0 commit comments

Comments
 (0)