Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue#444 and vetlog_master.sql #454

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
23 changes: 16 additions & 7 deletions src/main/resources/db/migration/V1__vetlog_master.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
-- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64)
--
-- Host: localhost Database: vetlog_spring_boot
-- ------------------------------------------------------
-- Server version 5.7.18-0ubuntu0.17.04.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
Expand All @@ -14,7 +9,6 @@
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `registration_code`
--
Expand All @@ -26,7 +20,7 @@ CREATE TABLE `registration_code` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`date_created` datetime NOT NULL,
`email` varchar(255) NOT NULL,
`status` int(11) NOT NULL,
`status` tinyint(11) NOT NULL,
`token` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Expand Down Expand Up @@ -88,6 +82,7 @@ CREATE TABLE `user` (
`username` varchar(255) NOT NULL,
`first_name` varchar(255) DEFAULT NULL,
`last_name` varchar(255) DEFAULT NULL,
`country_code` varchar(255) default null,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_sb8bbouer5wak8vyiiy4pf2bx` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
Expand Down Expand Up @@ -227,3 +222,17 @@ CREATE TABLE `pet_medicine` (
KEY `FKnf9loskcjkxo9f2qafq08dyjm` (`pet_medicine_id`),
CONSTRAINT `FKnf9loskcjkxo9f2qafq08dyjm` FOREIGN KEY (`pet_medicine_id`) REFERENCES `pet` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flyway works with a concept named migrations, the main advantage of doing this is to create a database evolution from the very first version to the current version. You do not need to create new tables in the V1_vetlog_master.sql since this is the first migration. You can know more about Flyway here: https://www.baeldung.com/database-migrations-with-flyway

DROP TABLE IF EXISTS `vaccination`;
CREATE TABLE vaccination (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`pet_id` bigint(20) NOT NULL,
`name` varchar(255) NOT NULL,
`date` date NOT NULL,
`status` varchar(255),
`pet` varchar(255),
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci;
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"homepage": "https://github.com/josdem/servizi-dog-template#readme",
"dependencies": {
"jquery": "^3.6.0",
"bootstrap": "~3.3.7",
"bootstrap": "~5.3",
"font-awesome": "~4.1.0"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating boostrap version to the latest is the easy part, however we need to make sure it is compatible with the template we are using: servizi-dog-theme, as you can
see the template is broken with this version: vetlog

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe i'm doing something wrong, but template looks same even with previous version (3.3.7) of bootstrap, when i deploy project locally

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe i'm doing something wrong, but template looks same even with previous version (3.3.7) of bootstrap, when i deploy project locally

I see, try to run this command: npm install from this directory: ${PROJECT_HOME}/src/main/resources/static/assets/servizi-dog-theme

Copy link
Author

@Rasta341 Rasta341 Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, try to run this command: npm install from this directory: ${PROJECT_HOME}/src/main/resources/static/assets/servizi-dog-theme

thats work, thanks!

}
}