Skip to content
Open
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
1 change: 1 addition & 0 deletions feature0001.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feature 0001
1 change: 1 addition & 0 deletions src/main/java/org/example/TestConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class TestConfiguration extends Configuration {
@NotNull
private final SwaggerBundleConfiguration swagger =
new SwaggerBundleConfiguration();

@JsonProperty("swagger")
public SwaggerBundleConfiguration getSwagger() {
swagger.setResourcePackage("org.example.controllers");
Expand Down
14 changes: 12 additions & 2 deletions src/main/java/org/example/daos/TestDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,24 @@ public List<String> testConnection() throws SQLException {
try (Connection connection = DatabaseConnector.getConnection()) {
Statement statement = connection.createStatement();

ResultSet resultSet = statement.executeQuery(
"SHOW DATABASES;");

long start = System.currentTimeMillis();
ResultSet resultSet = statement.executeQuery("SHOW DATABASES;");
long end = System.currentTimeMillis();

System.out.println("Total time to executed in milliseconds = "
+ (end - start));

System.out.println("Retrieving database names");

while (resultSet.next()) {
System.out.println(resultSet.getString("Database"));
databases.add(resultSet.getString("Database"));
}
System.out.println("Finished retrieving database names");
}

return databases;

}
}
7 changes: 7 additions & 0 deletions src/main/resources/db/migration/V2__create_user_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CREATE TABLE user (
id int PRIMARY KEY AUTO_INCREMENT NOT NULL,
username varchar(100) NOT NULL,
password varchar(100) NOT NULL,
roleId int NOT NULL,
FOREIGN KEY (roleId) REFERENCES role(id)
);
1 change: 1 addition & 0 deletions src/main/resources/db/migration/V3__update_user_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE user RENAME COLUMN roleId TO role_id;