feat: created yaml databaseChangeLog for init schema of database

This commit is contained in:
vilar 2025-12-17 18:21:59 +05:00
parent 051af6d293
commit e902ffd7fc
7 changed files with 154 additions and 0 deletions

View file

@ -0,0 +1,20 @@
databaseChangeLog:
- changeSet:
id: 001-init-vets-schema
author: vsevolodkolmogorov
changes:
- createTable:
tableName: vets
columns:
- column:
name: id
type: int
autoIncrement: true
constraints:
primaryKey: true
- column:
name: first_name
type: varchar(30)
- column:
name: last_name
type: varchar(30)

View file

@ -0,0 +1,17 @@
databaseChangeLog:
- changeSet:
id: 003-init-specialties-schema
author: vsevolodkolmogorov
changes:
- createTable:
tableName: specialties
columns:
- column:
name: id
type: int
autoIncrement: true
constraints:
primaryKey: true
- column:
name: name
type: varchar(30)

View file

@ -0,0 +1,17 @@
databaseChangeLog:
- changeSet:
id: 007-init-types-schema
author: vsevolodkolmogorov
changes:
- createTable:
tableName: types
columns:
- column:
name: id
type: int
autoIncrement: true
constraints:
primaryKey: true
- column:
name: name
type: varchar(30)

View file

@ -0,0 +1,29 @@
databaseChangeLog:
- changeSet:
id: 009-init-owners-schema
author: vsevolodkolmogorov
changes:
- createTable:
tableName: owners
columns:
- column:
name: id
type: int
autoIncrement: true
constraints:
primaryKey: true
- column:
name: first_name
type: varchar(30)
- column:
name: last_name
type: varchar(30)
- column:
name: address
type: varchar(50)
- column:
name: city
type: varchar(40)
- column:
name: telephone
type: varchar(10)

View file

@ -0,0 +1,18 @@
databaseChangeLog:
- changeSet:
id: 005-init-vet_specialties-schema
author: vsevolodkolmogorov
changes:
- createTable:
tableName: vet_specialties
columns:
- column:
name: vet_id
type: int
constraints:
nullable: false
- column:
name: specialty_id
type: int
constraints:
nullable: false

View file

@ -0,0 +1,28 @@
databaseChangeLog:
- changeSet:
id: 011-init-pets-schema
author: vsevolodkolmogorov
changes:
- createTable:
tableName: pets
columns:
- column:
name: id
type: int
autoIncrement: true
constraints:
primaryKey: true
- column:
name: name
type: varchar(30)
- column:
name: birth_date
type: date
- column:
name: type_id
type: int
constraints:
nullable: false
- column:
name: owner_id
type: int

View file

@ -0,0 +1,25 @@
databaseChangeLog:
- changeSet:
id: 014-init-visits-schema
author: vsevolodkolmogorov
changes:
- createTable:
tableName: visits
columns:
- column:
name: id
type: int
autoIncrement: true
constraints:
primaryKey: true
- column:
name: pet_id
type: int
constraints:
nullable: false
- column:
name: visit_date
type: date
- column:
name: description
type: varchar(50)