Skip to content

Commit

Permalink
Revert "#46 upgraded posmulten dependency to version 0.8.1 (#47)"
Browse files Browse the repository at this point in the history
This reverts commit 0e2ee19.
  • Loading branch information
starnowski committed Mar 7, 2024
1 parent 0e2ee19 commit 3c1d634
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Besides that you need to add maven dependency as below:
<dependency>
<groupId>com.github.starnowski.posmulten.configuration</groupId>
<artifactId>configuration-yaml-interpreter</artifactId>
<version>0.8.1</version>
<version>0.7.2</version>
<scope>test</scope>
</dependency>
```
Expand Down
2 changes: 1 addition & 1 deletion hibernate6-functional-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<dependency>
<groupId>com.github.starnowski.posmulten.configuration</groupId>
<artifactId>configuration-yaml-interpreter</artifactId>
<version>0.8.1</version>
<version>0.7.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO "posmhib4-user";
--TODO Add option in builder component so that the correct access for grantee could be added.
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO "posmhib4-user";

-- This is required because hibernate does not creates foreign key constraint for JoinColumnsOrFormulas annotation
ALTER TABLE posts_nonforeignkeyconstraint ADD CONSTRAINT fk_posts_users_author_manual_added FOREIGN KEY (user_id, tenant_id) REFERENCES user_info_nonforeignkeyconstraint(user_id, tenant);
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ force_row_level_security_for_table_owner: false
default_tenant_id_column: "tenant_id"
grantee: "{{template_user_grantee}}"
set_current_tenant_identifier_as_default_value_for_tenant_column_in_all_tables: true
create_foreignkey_constraint_with_tenant_column: true
valid_tenant_value_constraint:
is_tenant_valid_function_name: is_t_valid
is_tenant_valid_constraint_name: "is_tenant_valid_constraint_sdfa"
Expand All @@ -26,6 +25,7 @@ tables:
name_for_function_that_checks_if_record_exists_in_table: "is_user_exists"
pk_columns_name_to_type:
user_id: uuid
tenant: "VARCHAR(255)"
- name: user_role_nonforeignkeyconstraint
rls_policy:
name: "user_role_table_rls_policy"
Expand All @@ -35,6 +35,7 @@ tables:
name_for_function_that_checks_if_record_exists_in_table: "is_user_role_exists"
pk_columns_name_to_type:
id: bigint
tenant: "VARCHAR(255)"
- name: posts_nonforeignkeyconstraint
rls_policy:
name: "posts_table_rls_policy"
Expand All @@ -43,12 +44,8 @@ tables:
primary_key_definition:
name_for_function_that_checks_if_record_exists_in_table: "is_posts_exists"
pk_columns_name_to_type:
key: bigint
foreign_keys:
- constraint_name: "user_info_tenant_constraint"
table_name: user_info_nonforeignkeyconstraint
foreign_key_primary_key_columns_mappings:
user_id: user_id
id: bigint
tenant_id: "VARCHAR(255)"
- name: comments_nonforeignkeyconstraint
rls_policy:
name: "comments_table_rls_policy"
Expand All @@ -58,15 +55,7 @@ tables:
name_for_function_that_checks_if_record_exists_in_table: "is_comments_exists"
pk_columns_name_to_type:
id: bigint
foreign_keys:
- constraint_name: "user_info_tenant_constraint"
table_name: user_info_nonforeignkeyconstraint
foreign_key_primary_key_columns_mappings:
user_id: user_id
- constraint_name: "posts_tenant_constraint"
table_name: posts_nonforeignkeyconstraint
foreign_key_primary_key_columns_mappings:
post_id: key
comment_tenant_id: "VARCHAR(255)"
- name: categories_nonforeignkeyconstraint
rls_policy:
name: "categories_table_rls_policy"
Expand All @@ -75,37 +64,19 @@ tables:
name_for_function_that_checks_if_record_exists_in_table: "is_categories_exists"
pk_columns_name_to_type:
id: bigint
categorytenantid: "VARCHAR(255)"
- name: posts_categories_nonforeignkeyconstraint
rls_policy:
name: "posts_categories_table_rls_policy"
create_tenant_column_for_table: true
foreign_keys:
- constraint_name: "posts_tenant_constraint"
table_name: "posts_nonforeignkeyconstraint"
foreign_key_primary_key_columns_mappings:
posts_key: key
- constraint_name: "categories_tenant_constraint"
table_name: "categories_nonforeignkeyconstraint"
foreign_key_primary_key_columns_mappings:
categories_id: id
- name: categories_category_types
rls_policy:
name: "categories_category_types_table_rls_policy"
create_tenant_column_for_table: true
foreign_keys:
- constraint_name: "categories_tenant_constraint"
table_name: "categories_nonforeignkeyconstraint"
foreign_key_primary_key_columns_mappings:
Category_id: id
- name: posts_category_types
rls_policy:
name: "posts_category_types_table_rls_policy"
create_tenant_column_for_table: true
foreign_keys:
- constraint_name: "posts_tenant_constraint"
table_name: "posts_nonforeignkeyconstraint"
foreign_key_primary_key_columns_mappings:
post_id: key
sql_definitions_validation:
identifier_max_length: 30
identifier_min_length: 5
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<properties>
<org.hibernate.hibernate.core.version>5.6.3.Final</org.hibernate.hibernate.core.version>
<com.github.starnowski.posmulten.postgresql.core.version>0.8.1</com.github.starnowski.posmulten.postgresql.core.version>
<com.github.starnowski.posmulten.postgresql.core.version>0.7.2</com.github.starnowski.posmulten.postgresql.core.version>
<org.projectlombok.lombok.version>1.18.28</org.projectlombok.lombok.version>
<org.codehaus.groovy.groovy-all.version>2.4.12</org.codehaus.groovy.groovy-all.version>
<spock.core.version>1.1-groovy-2.4</spock.core.version>
Expand Down

0 comments on commit 3c1d634

Please sign in to comment.