Skip to content

Commit 7544e27

Browse files
authored
Merge pull request #207 from statisticsnorway/fix/table-user-name
fix table user name
2 parents fd79522 + a79c233 commit 7544e27

File tree

6 files changed

+1194
-9
lines changed

6 files changed

+1194
-9
lines changed
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
# custom properties used when "h2-inmemory" Profile is used
2-
spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_ON_EXIT=FALSE;MODE=MySQL;NON_KEYWORDS=user
2+
spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_ON_EXIT=FALSE;MODE=PostgreSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=user
3+
spring.datasource.driverClassName=org.h2.Driver
4+
spring.datasource.username=sa
5+
spring.datasource.password=
6+
7+
spring.flyway.enabled=true
8+
spring.flyway.locations=classpath:db/migration/postgresql
9+
10+
spring.jpa.hibernate.ddl-auto=create-drop
11+
spring.jpa.show-sql=true

klass-api/src/main/resources/application-postgres-local.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ spring.datasource.driverclassName=org.postgresql.Driver
88
spring.jpa.hibernate.ddl-auto=none
99
spring.flyway.enabled=false
1010

11-
#spring.flyway.locations=classpath:db/migration/{vendor}
12-
1311
spring.datasource.hikari.connection-test-query=SELECT 1
1412
spring.datasource.hikari.validation-timeout=3000
1513

klass-shared/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,6 @@
106106
<groupId>org.flywaydb</groupId>
107107
<artifactId>flyway-core</artifactId>
108108
</dependency>
109-
<dependency>
110-
<groupId>org.flywaydb</groupId>
111-
<artifactId>flyway-mysql</artifactId>
112-
</dependency>
113109
<dependency>
114110
<groupId>org.mariadb.jdbc</groupId>
115111
<artifactId>mariadb-java-client</artifactId>

klass-shared/src/main/java/no/ssb/klass/core/model/User.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
@Entity
1515
@Table(
16-
name = "user",
16+
name = "\"user\"",
1717
indexes = {
1818
@Index(columnList = "username", name = "user_username_idx", unique = true),
1919
@Index(columnList = "fullname", name = "user_fullname_idx")
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
# custom properties used when "h2-inmemory" Profile is used
2-
spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_ON_EXIT=FALSE;MODE=MySQL;NON_KEYWORDS=user
2+
spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_ON_EXIT=FALSE;MODE=PostgreSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=user
3+
spring.datasource.driverClassName=org.h2.Driver
4+
spring.datasource.username=sa
5+
spring.datasource.password=
6+
7+
spring.flyway.enabled=true
8+
spring.flyway.locations=classpath:db/migration/postgresql
9+
10+
spring.jpa.hibernate.ddl-auto=create-drop
11+
spring.jpa.show-sql=true

0 commit comments

Comments
 (0)