Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset databases/users for each Hibernate ORM tenancy test module #36914

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
CREATE DATABASE IF NOT EXISTS base;
CREATE DATABASE IF NOT EXISTS mycompany;
CREATE DATABASE IF NOT EXISTS inventory;
CREATE DATABASE IF NOT EXISTS inventorymycompany;
CREATE OR REPLACE DATABASE base;
CREATE OR REPLACE DATABASE mycompany;
CREATE OR REPLACE DATABASE inventory;
CREATE OR REPLACE DATABASE inventorymycompany;

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 mycompany.* TO 'jane'@'%';

CREATE USER IF NOT EXISTS 'john'@'%' IDENTIFIED BY 'def';
CREATE OR REPLACE USER 'john'@'%' IDENTIFIED BY 'def';
GRANT ALL privileges ON inventory.* TO 'john'@'%';
GRANT ALL privileges ON inventorymycompany.* TO 'john'@'%';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
CREATE DATABASE IF NOT EXISTS base;
CREATE DATABASE IF NOT EXISTS mycompany;
CREATE DATABASE IF NOT EXISTS inventory;
CREATE DATABASE IF NOT EXISTS inventorymycompany;
CREATE OR REPLACE DATABASE base;
CREATE OR REPLACE DATABASE mycompany;
CREATE OR REPLACE DATABASE inventory;
CREATE OR REPLACE DATABASE inventorymycompany;

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 mycompany.* TO 'jane'@'%';

CREATE USER IF NOT EXISTS 'john'@'%' IDENTIFIED BY 'def';
CREATE OR REPLACE USER 'john'@'%' IDENTIFIED BY 'def';
GRANT ALL privileges ON inventory.* TO 'john'@'%';
GRANT ALL privileges ON inventorymycompany.* TO 'john'@'%';

Expand Down
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;