2023-07-07 13:23:19 +03:00
|
|
|
{
|
|
|
|
"name": "03_add_column_to_products",
|
|
|
|
"operations": [
|
|
|
|
{
|
|
|
|
"add_column": {
|
|
|
|
"table": "products",
|
2023-07-20 08:37:03 +03:00
|
|
|
"up": "UPPER(name)",
|
2023-07-07 13:23:19 +03:00
|
|
|
"column": {
|
|
|
|
"name": "description",
|
|
|
|
"type": "varchar(255)",
|
|
|
|
"nullable": true
|
|
|
|
}
|
|
|
|
}
|
2023-07-13 10:38:43 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"add_column": {
|
|
|
|
"table": "products",
|
|
|
|
"column": {
|
|
|
|
"name": "stock",
|
|
|
|
"type": "int",
|
|
|
|
"nullable": false,
|
|
|
|
"default": "100"
|
|
|
|
}
|
|
|
|
}
|
2023-07-21 09:47:42 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"add_column": {
|
|
|
|
"table": "products",
|
|
|
|
"up": "name || '-category'",
|
|
|
|
"column": {
|
|
|
|
"name": "category",
|
|
|
|
"type": "varchar(255)",
|
|
|
|
"nullable": false
|
|
|
|
}
|
|
|
|
}
|
2023-07-07 13:23:19 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|