Skip to content

Commit

Permalink
pc - fix liquibase code for Restaurants
Browse files Browse the repository at this point in the history
  • Loading branch information
pconrad committed Oct 18, 2024
1 parent a5b90fb commit a57c0ad
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity(name = "restaurant")
@Entity(name = "restaurants")
public class Restaurant {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand Down
56 changes: 56 additions & 0 deletions src/main/resources/db/migration/changes/Restaurants.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"databaseChangeLog": [
{
"changeSet": {
"id": "Restaurants-1",
"author": "phtcon",
"preConditions": [
{
"onFail": "MARK_RAN"
},
{
"not": [
{
"tableExists": {
"tableName": "RESTAURANTS"
}
}
]
}
],
"changes": [
{
"createTable": {
"columns": [
{
"column": {
"autoIncrement": true,
"constraints": {
"primaryKey": true,
"primaryKeyName": "RESTAURANTS_PK"
},
"name": "ID",
"type": "BIGINT"
}
},
{
"column": {
"name": "NAME",
"type": "VARCHAR(255)"
}
},
{
"column": {
"name": "DESCRIPTION",
"type": "VARCHAR(255)"
}
}
],
"tableName": "RESTAURANTS"
}
}
]
}
}
]
}

0 comments on commit a57c0ad

Please sign in to comment.