You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docker run -it --rm=true --name quarkus_test -e POSTGRES_USER=quarkus_test -e POSTGRES_PASSWORD=quarkus_test -e POSTGRES_DB=quarkus_test -p 5432:5432 postgres:13.3
and after i run the ./mvnw quarkus:dev I didn't see any schemas of base,mycompany i tried to change the application.properties
SCHEMA Tenant Configuration (environment variable expansion is used to facilitate docker-compose setup)
quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=quarkus_test
quarkus.datasource.password=quarkus_test
quarkus.datasource.jdbc.url=jdbc:postgresql://${DB_HOST_TENANT_BASE:localhost}:${DB_PORT_TENANT_BASE:5432}/quarkus_test
quarkus.datasource.jdbc.max-size=8
quarkus.datasource.jdbc.min-size=2
quarkus.flyway.schemas=base,mycompany
quarkus.flyway.locations=schema
quarkus.flyway.migrate-at-start=true
database.quarkus.flyway.schemas=
database.quarkus.flyway.locations=classpath:db/migration
database.quarkus.flyway.migrate-at-start=true
but I didn't see that any scheme was created. and this file https://github.com/quarkusio/quarkus-quickstarts/blob/main/hibernate-orm-multi-tenancy-quickstart/src/main/resources/schema/V1.0.0__create_fruits.sql didn't invoke
CREATE SEQUENCE base.known_fruits_id_seq;
SELECT setval('base."known_fruits_id_seq"', 3);
CREATE TABLE base.known_fruits
(
id INT,
name VARCHAR(40)
);
INSERT INTO base.known_fruits(id, name) VALUES (1, 'Cherry');
INSERT INTO base.known_fruits(id, name) VALUES (2, 'Apple');
INSERT INTO base.known_fruits(id, name) VALUES (3, 'Banana');
CREATE SEQUENCE mycompany.known_fruits_id_seq;
SELECT setval('mycompany."known_fruits_id_seq"', 3);
CREATE TABLE mycompany.known_fruits
(
id INT,
name VARCHAR(40)
);
INSERT INTO mycompany.known_fruits(id, name) VALUES (1, 'Avocado');
INSERT INTO mycompany.known_fruits(id, name) VALUES (2, 'Apricots');
INSERT INTO mycompany.known_fruits(id, name) VALUES (3, 'Blackberries');
The text was updated successfully, but these errors were encountered:
i053322
changed the title
How to run multi tenant application - ttps://github.com/quarkusio/quarkus-quickstarts/tree/main/hibernate-orm-multi-tenancy-quickstart
How to run multi tenant application - https://github.com/quarkusio/quarkus-quickstarts/tree/main/hibernate-orm-multi-tenancy-quickstart
Apr 21, 2023
I am new with quarkus I tried to check this example https://github.com/quarkusio/quarkus-quickstarts/tree/main/hibernate-orm-multi-tenancy-quickstart the SCHEMA Multitenancy . first I run the docker with
docker run -it --rm=true --name quarkus_test -e POSTGRES_USER=quarkus_test -e POSTGRES_PASSWORD=quarkus_test -e POSTGRES_DB=quarkus_test -p 5432:5432 postgres:13.3
and after i run the ./mvnw quarkus:dev I didn't see any schemas of base,mycompany i tried to change the application.properties
General settings
quarkus.log.level=INFO
%test.quarkus.log.level=INFO
%dev.quarkus.log.level=INFO
quarkus.native.native-image-xmx=5G
Hibernate ORM settings
quarkus.hibernate-orm.database.generation=none
quarkus.hibernate-orm.multitenant=SCHEMA
%database.quarkus.hibernate-orm.multitenant=DATABASE
SCHEMA Tenant Configuration (environment variable expansion is used to facilitate docker-compose setup)
quarkus.datasource.db-kind=postgresql
quarkus.datasource.username=quarkus_test
quarkus.datasource.password=quarkus_test
quarkus.datasource.jdbc.url=jdbc:postgresql://${DB_HOST_TENANT_BASE:localhost}:${DB_PORT_TENANT_BASE:5432}/quarkus_test
quarkus.datasource.jdbc.max-size=8
quarkus.datasource.jdbc.min-size=2
quarkus.flyway.schemas=base,mycompany
quarkus.flyway.locations=schema
quarkus.flyway.migrate-at-start=true
database.quarkus.flyway.schemas=
database.quarkus.flyway.locations=classpath:db/migration
database.quarkus.flyway.migrate-at-start=true
but I didn't see that any scheme was created. and this file https://github.com/quarkusio/quarkus-quickstarts/blob/main/hibernate-orm-multi-tenancy-quickstart/src/main/resources/schema/V1.0.0__create_fruits.sql didn't invoke
CREATE SEQUENCE base.known_fruits_id_seq;
SELECT setval('base."known_fruits_id_seq"', 3);
CREATE TABLE base.known_fruits
(
id INT,
name VARCHAR(40)
);
INSERT INTO base.known_fruits(id, name) VALUES (1, 'Cherry');
INSERT INTO base.known_fruits(id, name) VALUES (2, 'Apple');
INSERT INTO base.known_fruits(id, name) VALUES (3, 'Banana');
CREATE SEQUENCE mycompany.known_fruits_id_seq;
SELECT setval('mycompany."known_fruits_id_seq"', 3);
CREATE TABLE mycompany.known_fruits
(
id INT,
name VARCHAR(40)
);
INSERT INTO mycompany.known_fruits(id, name) VALUES (1, 'Avocado');
INSERT INTO mycompany.known_fruits(id, name) VALUES (2, 'Apricots');
INSERT INTO mycompany.known_fruits(id, name) VALUES (3, 'Blackberries');
The text was updated successfully, but these errors were encountered: