-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36914 from yrodiere/safer-test-init
Reset databases/users for each Hibernate ORM tenancy test module
- Loading branch information
Showing
3 changed files
with
20 additions
and
23 deletions.
There are no files selected for viewing
12 changes: 6 additions & 6 deletions
12
...hibernate-orm-tenancy/connection-resolver-legacy-qualifiers/custom-mariadbconfig/init.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
integration-tests/hibernate-orm-tenancy/connection-resolver/custom-mariadbconfig/init.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 8 additions & 11 deletions
19
integration-tests/hibernate-orm-tenancy/datasource/custom-mariadbconfig/init.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
CREATE DATABASE IF NOT EXISTS base; | ||
CREATE USER IF NOT EXISTS 'jane'@'%' IDENTIFIED BY 'abc'; | ||
GRANT ALL privileges ON base.* TO 'jane'@'%'; | ||
|
||
CREATE DATABASE IF NOT EXISTS mycompany; | ||
CREATE USER IF NOT EXISTS 'john'@'%' IDENTIFIED BY 'def'; | ||
GRANT ALL privileges ON mycompany.* TO 'john'@'%'; | ||
CREATE OR REPLACE DATABASE base; | ||
CREATE OR REPLACE DATABASE mycompany; | ||
CREATE OR REPLACE DATABASE inventory; | ||
CREATE OR REPLACE DATABASE inventorymycompany; | ||
|
||
CREATE DATABASE IF NOT EXISTS inventory; | ||
CREATE USER IF NOT EXISTS 'jane'@'%' IDENTIFIED BY 'abc'; | ||
CREATE OR REPLACE USER 'jane'@'%' IDENTIFIED BY 'abc'; | ||
GRANT ALL privileges ON base.* TO 'jane'@'%'; | ||
GRANT ALL privileges ON inventory.* TO 'jane'@'%'; | ||
|
||
CREATE DATABASE IF NOT EXISTS inventorymycompany; | ||
CREATE USER IF NOT EXISTS 'john'@'%' IDENTIFIED BY 'def'; | ||
CREATE OR REPLACE USER 'john'@'%' IDENTIFIED BY 'def'; | ||
GRANT ALL privileges ON mycompany.* TO 'john'@'%'; | ||
GRANT ALL privileges ON inventorymycompany.* TO 'john'@'%'; | ||
|
||
FLUSH PRIVILEGES; |