Skip to content
Open

testt1 #2095

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
eb1978f
pom file changes
Prathushadevijsgd Nov 19, 2024
2534266
[maven-release-plugin] prepare release spring-petclinic-4.0.0
Prathushadevijsgd Nov 19, 2024
c230c9c
[maven-release-plugin] prepare for next development iteration
Prathushadevijsgd Nov 19, 2024
edfd62e
[maven-release-plugin] prepare release spring-petclinic-4.0.1
Prathushadevijsgd Nov 19, 2024
294a727
[maven-release-plugin] prepare for next development iteration
Prathushadevijsgd Nov 19, 2024
cc4d59a
Create Dockerfile
Prathushadevijsgd Dec 13, 2024
a2f5dd5
Rename Dockerfile to dockerfile
Prathushadevijsgd Dec 13, 2024
254776a
Create jenkinsfile
Prathushadevijsgd Dec 13, 2024
df59d42
Rename jenkinsfile to Jenkinsfile
Prathushadevijsgd Dec 13, 2024
65fafaa
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
0c1a369
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
5390834
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
01da8b4
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
bea4222
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
9078b65
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
1baf6c0
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
26c7639
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
4241a4e
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
d05b38a
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
232d34d
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
d3988c9
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
ae1e6bc
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
471ee9c
Update Jenkinsfile
Prathushadevijsgd Dec 16, 2024
2a57842
Update Jenkinsfile
Prathushadevijsgd Dec 17, 2024
bf9aaee
Update Jenkinsfile
Prathushadevijsgd Dec 17, 2024
05b5374
Update Jenkinsfile
Prathushadevijsgd Dec 17, 2024
18fce5f
Update Jenkinsfile
Prathushadevijsgd Dec 18, 2024
230d2b2
Update Jenkinsfile
Prathushadevijsgd Dec 18, 2024
18ac37c
Update Jenkinsfile
Prathushadevijsgd Dec 19, 2024
da46c45
Update Jenkinsfile
Prathushadevijsgd Dec 19, 2024
1de76e6
Update Jenkinsfile
Prathushadevijsgd Dec 19, 2024
cd0d77a
Delete Jenkinsfile
Prathushadevijsgd Jan 29, 2025
fbe42b0
Create Jenkinsfile
Prathushadevijsgd Jan 30, 2025
2f8fe8f
Update Jenkinsfile
Prathushadevijsgd Jan 30, 2025
a393673
Update Jenkinsfile
Prathushadevijsgd Jan 30, 2025
6659144
Update Jenkinsfile
Prathushadevijsgd Jan 31, 2025
5f82455
Update Jenkinsfile
Prathushadevijsgd Feb 3, 2025
0c8ea70
Update Jenkinsfile
Prathushadevijsgd Feb 3, 2025
14b4232
Update Jenkinsfile
Prathushadevijsgd Feb 3, 2025
1db01f0
Update Jenkinsfile
Prathushadevijsgd Feb 3, 2025
0649e1e
Update Jenkinsfile
Prathushadevijsgd Feb 3, 2025
82661a7
Create increment_version.sh
Prathushadevijsgd Feb 4, 2025
1657728
Update Jenkinsfile
Prathushadevijsgd Feb 4, 2025
8678218
Update Jenkinsfile
Prathushadevijsgd Feb 4, 2025
1c61845
Update increment_version.sh
Prathushadevijsgd Feb 4, 2025
02d7120
Update Jenkinsfile
Prathushadevijsgd Feb 4, 2025
808516a
Update Jenkinsfile
Prathushadevijsgd Feb 4, 2025
015921d
Update Jenkinsfile
Prathushadevijsgd Feb 4, 2025
1fdf5e4
Update application-mysql.properties
Prathushadevijsgd Feb 5, 2025
dd8e54f
Update application-mysql.properties
Prathushadevijsgd Feb 5, 2025
6e20c31
Update application-mysql.properties
Prathushadevijsgd Feb 5, 2025
4fe7462
Update application-mysql.properties
Prathushadevijsgd Feb 5, 2025
ef2477e
Update application-mysql.properties
Prathushadevijsgd Feb 5, 2025
f7ac229
Update Jenkinsfile
Prathushadevijsgd Feb 5, 2025
f4f559e
Update Jenkinsfile
Prathushadevijsgd Feb 6, 2025
7038057
Update Jenkinsfile
Prathushadevijsgd Feb 6, 2025
58b9247
Update Jenkinsfile
Prathushadevijsgd Feb 6, 2025
a1eeb8e
Update Jenkinsfile
Prathushadevijsgd Feb 6, 2025
2cf1320
Update application.properties
Prathushadevijsgd Feb 6, 2025
fff084d
Update application.properties
Prathushadevijsgd Feb 6, 2025
a5a99c5
Update application-mysql.properties
Prathushadevijsgd Feb 6, 2025
464ca74
Update application-mysql.properties
Prathushadevijsgd Feb 7, 2025
1a033cd
Update application.properties
Prathushadevijsgd Feb 7, 2025
e763ae5
Update application.properties
Prathushadevijsgd Feb 7, 2025
d22ff14
Update application-mysql.properties
Prathushadevijsgd Feb 7, 2025
62ee76d
Update application-mysql.properties
Prathushadevijsgd Feb 7, 2025
f34c540
Update application.properties
Prathushadevijsgd Feb 7, 2025
96214d9
Update application-mysql.properties
Prathushadevijsgd Feb 7, 2025
6f4f9dc
Update application-mysql.properties
Prathushadevijsgd Feb 7, 2025
1588a27
Update application.properties
Prathushadevijsgd Feb 8, 2025
0deb0bb
Update application.properties
Prathushadevijsgd Feb 8, 2025
689ede8
Update application.properties
Prathushadevijsgd Feb 8, 2025
9e00e76
updated code
Prathushadevijsgd Feb 8, 2025
2b34d6b
updated hibernate
Prathushadevijsgd Feb 8, 2025
bd46d70
updated prop
Prathushadevijsgd Feb 8, 2025
80b9702
updated data.sql
Prathushadevijsgd Feb 8, 2025
8f4a09c
updated properties
Prathushadevijsgd Feb 8, 2025
ead92ea
Update Jenkinsfile
Prathushadevijsgd Feb 8, 2025
8f67b48
Update application.properties
Prathushadevijsgd Feb 8, 2025
2c8dd80
Update application.properties
Prathushadevijsgd Feb 8, 2025
d9b245a
Update application.properties
Prathushadevijsgd Feb 8, 2025
f7fcc3b
Update application.properties
Prathushadevijsgd Feb 8, 2025
0176455
Update WelcomeController.java
Prathushadevijsgd Feb 11, 2025
297c4f4
Update WelcomeController.java
Prathushadevijsgd Feb 11, 2025
feecd96
Update WelcomeController.java
Prathushadevijsgd Feb 11, 2025
a8148f0
Update WelcomeController.java
Prathushadevijsgd Feb 11, 2025
6facfe2
Update welcome.html
Prathushadevijsgd Feb 14, 2025
938dff4
Update welcome.html
Prathushadevijsgd Feb 14, 2025
bcf952b
Update dockerfile
Prathushadevijsgd Oct 9, 2025
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
Binary file added .DS_Store
Binary file not shown.
82 changes: 82 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
pipeline {
agent any
environment {
DOCKER_IMAGE = "prathushadevijs/spring-petclinic-proj"
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Create Git Tag') {
steps {
script {
// Make sure the script has execute permissions
sh 'chmod +x ./increment_version.sh'
// Run the version increment script
sh './increment_version.sh'
}
}
}
stage('Build & Test') {
steps {
script {
sh 'mvn clean install -DskipTests'
}
}
}
stage('Login to Docker Hub') {
steps {
script {
withCredentials([usernamePassword(credentialsId: 'dockerhub-creds', usernameVariable: 'DOCKER_USERNAME', passwordVariable: 'DOCKER_PASSWORD')]) {
sh 'docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD'
}
}
}
}
stage('Get Git Tag') {
steps {
script {
// Fetch the most recent Git tag
env.gitTag = sh(script: 'git describe --tags --abbrev=0', returnStdout: true).trim()
echo "Using Git Tag: ${gitTag}"
}
}
}
stage('Build Docker Image') {
steps {
script {
// Use the gitTag variable set earlier
sh "docker build -t ${DOCKER_IMAGE}:${gitTag} ."
}
}
}
stage('Push to Docker Hub') {
steps {
script {
// Push the Docker image with the gitTag
withCredentials([usernamePassword(credentialsId: 'dockerhub-creds', usernameVariable: 'DOCKER_USERNAME', passwordVariable: 'DOCKER_PASSWORD')]) {
sh "docker push ${DOCKER_IMAGE}:${gitTag}"
}
}
}
}
stage('Deploy to EC2') {
steps {
script {
withCredentials([sshUserPrivateKey(credentialsId: 'ec2-ssh-key', keyFileVariable: 'KEYFILE')]) {
sh """
mkdir -p ~/.ssh
ssh-keyscan -H 34.201.2.231 >> ~/.ssh/known_hosts
ssh -i $KEYFILE [email protected] 'sudo docker pull ${DOCKER_IMAGE}:${gitTag} && \
sudo docker stop spring-petclinic || true && \
sudo docker rm spring-petclinic || true && \
sudo docker run -d --name spring-petclinic -p 8081:8080 ${DOCKER_IMAGE}:${gitTag}'
"""
}
}
}
}
}
}
14 changes: 14 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Build stages
FROM maven:3.8.4-openjdk-17-slim AS build
WORKDIR /app
COPY pom.xml .
RUN mvn dependency:go-offline
COPY src ./src
RUN mvn clean package -DskipTests

# Runtime stage
FROM openjdk:17-jdk-slim AS runtime
WORKDIR /app
COPY --from=build /app/target/*.jar /app/spring-petclinic.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/app/spring-petclinic.jar"]
37 changes: 37 additions & 0 deletions increment_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

# Fetch the latest tag from the repository
latest_tag=$(git describe --tags --abbrev=0)

# If no tags exist, start with version 1.0.0
if [ -z "$latest_tag" ]; then
echo "No tags found. Starting from v1.0.0"
new_version="v1.0.0"
else
# Check if the tag has a 'v' prefix (e.g., v1.2.3) or not (e.g., 1.2.3)
version_pattern="v?([0-9]+)\.([0-9]+)\.([0-9]+)"
if [[ $latest_tag =~ $version_pattern ]]; then
major="${BASH_REMATCH[1]}"
minor="${BASH_REMATCH[2]}"
patch="${BASH_REMATCH[3]}"

# Increment the minor version
minor=$((minor + 1))
new_version="v${major}.${minor}.0" # Reset patch version to 0 when incrementing minor
else
echo "Invalid tag format. Expected format: vX.Y.Z or X.Y.Z"
exit 1
fi
fi

# Print new version
echo "New version: $new_version"

# Create the new Git tag
git tag -a "$new_version" -m "Version $new_version"

# Push the new tag to the repository
git push origin "$new_version"

# Optionally, you can print the created tag to verify
git tag -l
19 changes: 13 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,30 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.5</version>
<relativePath></relativePath>
<relativePath />
</parent>

<groupId>org.springframework.samples</groupId>
<artifactId>spring-petclinic</artifactId>
<version>3.3.0-SNAPSHOT</version>
<version>4.0.2-SNAPSHOT</version>

<name>petclinic</name>

<scm>
<url>https://github.com/Prathushadevijsgd/spring-petclinic.git</url>
<developerConnection>scm:git:https://github.com/Prathushadevijsgd/spring-petclinic.git</developerConnection>
<connection>scm:git:https://github.com/Prathushadevijsgd/spring-petclinic.git</connection>
<tag>HEAD</tag>
</scm>

<properties>

<!-- Generic properties -->
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Important for reproducible builds. Update using e.g. ./mvnw versions:set -DnewVersion=... -->
<project.build.outputTimestamp>2023-05-10T07:42:50Z</project.build.outputTimestamp>
<project.build.outputTimestamp>2024-11-19T12:17:22Z</project.build.outputTimestamp>

<!-- Web dependencies -->
<webjars-bootstrap.version>5.3.3</webjars-bootstrap.version>
Expand Down Expand Up @@ -401,7 +408,7 @@
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
Expand All @@ -414,7 +421,7 @@
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
Expand All @@ -427,7 +434,7 @@
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
Expand Down
Binary file added src/.DS_Store
Binary file not shown.
Binary file added src/main/.DS_Store
Binary file not shown.
Binary file added src/main/resources/.DS_Store
Binary file not shown.
7 changes: 0 additions & 7 deletions src/main/resources/application-mysql.properties

This file was deleted.

6 changes: 0 additions & 6 deletions src/main/resources/application-postgres.properties

This file was deleted.

38 changes: 14 additions & 24 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
# database init, supports mysql too
database=h2
spring.sql.init.schema-locations=classpath*:db/${database}/schema.sql
spring.sql.init.data-locations=classpath*:db/${database}/data.sql

# Web
spring.thymeleaf.mode=HTML

# JPA
spring.jpa.hibernate.ddl-auto=none
spring.jpa.open-in-view=false

# Internationalization
spring.messages.basename=messages/messages

# Actuator
management.endpoints.web.exposure.include=*

# Logging
logging.level.org.springframework=INFO
# logging.level.org.springframework.web=DEBUG
# logging.level.org.springframework.context.annotation=TRACE

# Maximum time static resources should be cached
spring.web.resources.cache.cachecontrol.max-age=12h
# database=mysql
spring.datasource.url=jdbc:mysql://terraform-20250201163508870100000001.cx8weoi6ueor.us-east-1.rds.amazonaws.com:3306/springpetclinicdb
spring.datasource.username=admin
spring.datasource.password=projRDS123
# SQL is written to be idempotent so this is safe
# spring.sql.init.mode=always
# spring.jpa.hibernate.ddl-auto=update
# spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
# spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect
# spring.jpa.show-sql=true
# spring.jpa.properties.hibernate.format_sql=true
server.port=8080
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.hibernate.ddl-auto=update
53 changes: 53 additions & 0 deletions src/main/resources/data.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
INSERT IGNORE INTO vets VALUES (1, 'James', 'Carter');
INSERT IGNORE INTO vets VALUES (2, 'Helen', 'Leary');
INSERT IGNORE INTO vets VALUES (3, 'Linda', 'Douglas');
INSERT IGNORE INTO vets VALUES (4, 'Rafael', 'Ortega');
INSERT IGNORE INTO vets VALUES (5, 'Henry', 'Stevens');
INSERT IGNORE INTO vets VALUES (6, 'Sharon', 'Jenkins');

INSERT IGNORE INTO specialties VALUES (1, 'radiology');
INSERT IGNORE INTO specialties VALUES (2, 'surgery');
INSERT IGNORE INTO specialties VALUES (3, 'dentistry');

INSERT IGNORE INTO vet_specialties VALUES (2, 1);
INSERT IGNORE INTO vet_specialties VALUES (3, 2);
INSERT IGNORE INTO vet_specialties VALUES (3, 3);
INSERT IGNORE INTO vet_specialties VALUES (4, 2);
INSERT IGNORE INTO vet_specialties VALUES (5, 1);

INSERT IGNORE INTO types VALUES (1, 'cat');
INSERT IGNORE INTO types VALUES (2, 'dog');
INSERT IGNORE INTO types VALUES (3, 'lizard');
INSERT IGNORE INTO types VALUES (4, 'snake');
INSERT IGNORE INTO types VALUES (5, 'bird');
INSERT IGNORE INTO types VALUES (6, 'hamster');

INSERT IGNORE INTO owners VALUES (1, 'George', 'Franklin', '110 W. Liberty St.', 'Madison', '6085551023');
INSERT IGNORE INTO owners VALUES (2, 'Betty', 'Davis', '638 Cardinal Ave.', 'Sun Prairie', '6085551749');
INSERT IGNORE INTO owners VALUES (3, 'Eduardo', 'Rodriquez', '2693 Commerce St.', 'McFarland', '6085558763');
INSERT IGNORE INTO owners VALUES (4, 'Harold', 'Davis', '563 Friendly St.', 'Windsor', '6085553198');
INSERT IGNORE INTO owners VALUES (5, 'Peter', 'McTavish', '2387 S. Fair Way', 'Madison', '6085552765');
INSERT IGNORE INTO owners VALUES (6, 'Jean', 'Coleman', '105 N. Lake St.', 'Monona', '6085552654');
INSERT IGNORE INTO owners VALUES (7, 'Jeff', 'Black', '1450 Oak Blvd.', 'Monona', '6085555387');
INSERT IGNORE INTO owners VALUES (8, 'Maria', 'Escobito', '345 Maple St.', 'Madison', '6085557683');
INSERT IGNORE INTO owners VALUES (9, 'David', 'Schroeder', '2749 Blackhawk Trail', 'Madison', '6085559435');
INSERT IGNORE INTO owners VALUES (10, 'Carlos', 'Estaban', '2335 Independence La.', 'Waunakee', '6085555487');

INSERT IGNORE INTO pets VALUES (1, 'Leo', '2000-09-07', 1, 1);
INSERT IGNORE INTO pets VALUES (2, 'Basil', '2002-08-06', 6, 2);
INSERT IGNORE INTO pets VALUES (3, 'Rosy', '2001-04-17', 2, 3);
INSERT IGNORE INTO pets VALUES (4, 'Jewel', '2000-03-07', 2, 3);
INSERT IGNORE INTO pets VALUES (5, 'Iggy', '2000-11-30', 3, 4);
INSERT IGNORE INTO pets VALUES (6, 'George', '2000-01-20', 4, 5);
INSERT IGNORE INTO pets VALUES (7, 'Samantha', '1995-09-04', 1, 6);
INSERT IGNORE INTO pets VALUES (8, 'Max', '1995-09-04', 1, 6);
INSERT IGNORE INTO pets VALUES (9, 'Lucky', '1999-08-06', 5, 7);
INSERT IGNORE INTO pets VALUES (10, 'Mulligan', '1997-02-24', 2, 8);
INSERT IGNORE INTO pets VALUES (11, 'Freddy', '2000-03-09', 5, 9);
INSERT IGNORE INTO pets VALUES (12, 'Lucky', '2000-06-24', 2, 10);
INSERT IGNORE INTO pets VALUES (13, 'Sly', '2002-06-08', 1, 10);

INSERT IGNORE INTO visits VALUES (1, 7, '2010-03-04', 'rabies shot');
INSERT IGNORE INTO visits VALUES (2, 8, '2011-03-04', 'rabies shot');
INSERT IGNORE INTO visits VALUES (3, 8, '2009-06-04', 'neutered');
INSERT IGNORE INTO visits VALUES (4, 7, '2008-09-04', 'spayed');
Binary file added src/main/resources/db/.DS_Store
Binary file not shown.
Binary file added src/main/resources/db/mysql/.DS_Store
Binary file not shown.
55 changes: 55 additions & 0 deletions src/main/resources/schema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
CREATE TABLE IF NOT EXISTS vets (
id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(30),
last_name VARCHAR(30),
INDEX(last_name)
) engine=InnoDB;

CREATE TABLE IF NOT EXISTS specialties (
id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(80),
INDEX(name)
) engine=InnoDB;

CREATE TABLE IF NOT EXISTS vet_specialties (
vet_id INT(4) UNSIGNED NOT NULL,
specialty_id INT(4) UNSIGNED NOT NULL,
FOREIGN KEY (vet_id) REFERENCES vets(id),
FOREIGN KEY (specialty_id) REFERENCES specialties(id),
UNIQUE (vet_id,specialty_id)
) engine=InnoDB;

CREATE TABLE IF NOT EXISTS types (
id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(80),
INDEX(name)
) engine=InnoDB;

CREATE TABLE IF NOT EXISTS owners (
id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
first_name VARCHAR(30),
last_name VARCHAR(30),
address VARCHAR(255),
city VARCHAR(80),
telephone VARCHAR(20),
INDEX(last_name)
) engine=InnoDB;

CREATE TABLE IF NOT EXISTS pets (
id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(30),
birth_date DATE,
type_id INT(4) UNSIGNED NOT NULL,
owner_id INT(4) UNSIGNED,
INDEX(name),
FOREIGN KEY (owner_id) REFERENCES owners(id),
FOREIGN KEY (type_id) REFERENCES types(id)
) engine=InnoDB;

CREATE TABLE IF NOT EXISTS visits (
id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
pet_id INT(4) UNSIGNED,
visit_date DATE,
description VARCHAR(255),
FOREIGN KEY (pet_id) REFERENCES pets(id)
) engine=InnoDB;
4 changes: 2 additions & 2 deletions src/main/resources/templates/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<body>

<h2 th:text="#{welcome}">Welcome</h2>
<h2>Welcome to petclinic</h2>
<div class="row">
<div class="col-md-12">
<img class="img-responsive" src="../static/resources/images/pets.png" th:src="@{/resources/images/pets.png}"/>
Expand All @@ -13,4 +13,4 @@ <h2 th:text="#{welcome}">Welcome</h2>

</body>

</html>
</html>
7 changes: 7 additions & 0 deletions src/main/resources/user.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CREATE DATABASE IF NOT EXISTS springpetclinicdb;

ALTER DATABASE springpetclinicdb
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;

GRANT ALL PRIVILEGES ON springpetclinicdb.* TO 'springpetclinicdb'@'%' IDENTIFIED BY 'springpetclinicdb';