Skip to content

Commit

Permalink
Fix Flyway
Browse files Browse the repository at this point in the history
  • Loading branch information
radcortez committed Jun 19, 2024
1 parent e5564a1 commit afe3c89
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 53 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.radcortez.quarkus.playground.clients.simulator;

import jakarta.enterprise.context.ApplicationScoped;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.radcortez.quarkus.playground.clients.simulator;

import io.quarkus.runtime.Startup;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.radcortez.quarkus.playground.clients.simulator;

import jakarta.annotation.PostConstruct;
Expand Down
9 changes: 9 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
<dependency.mapstruct.version>1.5.5.Final</dependency.mapstruct.version>
<dependency.quarkus.version>3.11.2</dependency.quarkus.version>
<dependency.quarkiverse.microprofile.version>3.3.0</dependency.quarkiverse.microprofile.version>

<dependency.faker.version>2.2.2</dependency.faker.version>
<dependency.flyway-junit.version>2.1.0</dependency.flyway-junit.version>
</properties>

<build>
Expand Down Expand Up @@ -77,6 +79,13 @@
<artifactId>datafaker</artifactId>
<version>${dependency.faker.version}</version>
</dependency>

<dependency>
<groupId>com.radcortez.flyway</groupId>
<artifactId>flyway-junit5-extension</artifactId>
<version>${dependency.flyway-junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
10 changes: 6 additions & 4 deletions services/book-api/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down Expand Up @@ -118,6 +116,11 @@
<artifactId>quarkus-flyway</artifactId>
</dependency>

<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-postgresql</artifactId>
</dependency>

<dependency>
<groupId>io.quarkiverse.microprofile</groupId>
<artifactId>quarkus-microprofile</artifactId>
Expand Down Expand Up @@ -160,7 +163,6 @@
<dependency>
<groupId>com.radcortez.flyway</groupId>
<artifactId>flyway-junit5-extension</artifactId>
<version>2.1.0</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public class Book {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "id")
@SequenceGenerator(name = "id", sequenceName = "id")
@SequenceGenerator(name = "id", sequenceName = "id", allocationSize = 1)
private Long id;
private String author;
private String title;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ quarkus.log.console.level=DEBUG
# Database
quarkus.datasource.db-kind=postgresql
quarkus.flyway.migrate-at-start=true
quarkus.hibernate-orm.database.generation=none

%prod.quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/database
%prod.quarkus.datasource.username=database
Expand Down

0 comments on commit afe3c89

Please sign in to comment.