phone ==.>phones
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-06-29 12:09:33 +03:30
parent 7e7f49a96b
commit f6d1716ad0
7 changed files with 224 additions and 99 deletions
+140 -85
View File
@@ -864,15 +864,14 @@
"nullable": true,
"mappedType": "integer"
},
"phone": {
"name": "phone",
"type": "varchar(255)",
"phones": {
"name": "phones",
"type": "jsonb",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"length": 255,
"mappedType": "string"
"mappedType": "json"
},
"instagram": {
"name": "instagram",
@@ -1246,66 +1245,6 @@
"length": 255,
"mappedType": "string"
},
"card_number": {
"name": "card_number",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"length": 255,
"mappedType": "string"
},
"card_number2": {
"name": "card_number2",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"length": 255,
"mappedType": "string"
},
"card_number3": {
"name": "card_number3",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"length": 255,
"mappedType": "string"
},
"card_owner": {
"name": "card_owner",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"length": 255,
"mappedType": "string"
},
"card_owner2": {
"name": "card_owner2",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"length": 255,
"mappedType": "string"
},
"card_owner3": {
"name": "card_owner3",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"length": 255,
"mappedType": "string"
},
"enabled": {
"name": "enabled",
"type": "boolean",
@@ -1420,6 +1359,142 @@
},
"nativeEnums": {}
},
{
"columns": {
"id": {
"name": "id",
"type": "char(26)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 26,
"mappedType": "character"
},
"created_at": {
"name": "created_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"default": "now()",
"mappedType": "datetime"
},
"updated_at": {
"name": "updated_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 6,
"default": "now()",
"mappedType": "datetime"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"length": 6,
"mappedType": "datetime"
},
"payment_method_id": {
"name": "payment_method_id",
"type": "char(26)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 26,
"mappedType": "character"
},
"card_number": {
"name": "card_number",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
},
"owner": {
"name": "owner",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
}
},
"name": "payment_method_cards",
"schema": "public",
"indexes": [
{
"keyName": "payment_method_cards_created_at_index",
"columnNames": [
"created_at"
],
"composite": false,
"constraint": false,
"primary": false,
"unique": false
},
{
"keyName": "payment_method_cards_deleted_at_index",
"columnNames": [
"deleted_at"
],
"composite": false,
"constraint": false,
"primary": false,
"unique": false
},
{
"keyName": "payment_method_cards_payment_method_id_index",
"columnNames": [
"payment_method_id"
],
"composite": false,
"constraint": false,
"primary": false,
"unique": false
},
{
"keyName": "payment_method_cards_pkey",
"columnNames": [
"id"
],
"composite": false,
"constraint": true,
"primary": true,
"unique": true
}
],
"checks": [],
"foreignKeys": {
"payment_method_cards_payment_method_id_foreign": {
"constraintName": "payment_method_cards_payment_method_id_foreign",
"columnNames": [
"payment_method_id"
],
"localTableName": "public.payment_method_cards",
"referencedColumnNames": [
"id"
],
"referencedTableName": "public.payment_methods",
"updateRule": "cascade"
}
},
"nativeEnums": {}
},
{
"columns": {
"id": {
@@ -5491,26 +5566,6 @@
"length": 255,
"mappedType": "string"
},
"city": {
"name": "city",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"length": 255,
"mappedType": "string"
},
"province": {
"name": "province",
"type": "varchar(255)",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"length": 255,
"mappedType": "string"
},
"postal_code": {
"name": "postal_code",
"type": "varchar(255)",
@@ -0,0 +1,14 @@
import { Migration } from '@mikro-orm/migrations';
export class Migration20260629083652_phonesRestuarant extends Migration {
override async up(): Promise<void> {
this.addSql(`alter table "restaurants" add column "phones" jsonb null;`);
}
override async down(): Promise<void> {
this.addSql(`alter table "restaurants" add column "phone" varchar(255) null;`);
}
}