trabajando en añadir

This commit is contained in:
2025-10-24 16:15:05 +02:00
parent 3517918afe
commit 2ed032d7c6
18 changed files with 1412 additions and 47 deletions

View File

@ -0,0 +1,159 @@
databaseChangeLog:
- changeSet:
id: 00XX-create-direcciones
author: jjo
changes:
- createTable:
tableName: direcciones
columns:
- column:
name: id
type: BIGINT AUTO_INCREMENT
constraints:
primaryKey: true
nullable: false
- column:
name: user_id
type: BIGINT
constraints:
nullable: false
foreignKeyName: fk_direcciones_users
references: users(id)
onDelete: CASCADE
- column:
name: alias
type: VARCHAR(100)
constraints:
nullable: false
- column:
name: att
type: VARCHAR(150)
constraints:
nullable: false
- column:
name: direccion
type: VARCHAR(255)
constraints:
nullable: false
- column:
name: cp
type: MEDIUMINT UNSIGNED
constraints:
nullable: false
- column:
name: ciudad
type: VARCHAR(100)
constraints:
nullable: false
- column:
name: provincia
type: VARCHAR(100)
constraints:
nullable: false
- column:
name: pais_code3
type: CHAR(3)
constraints:
nullable: false
foreignKeyName: fk_direcciones_paises
references: paises(code3)
- column:
name: telefono
type: VARCHAR(30)
constraints:
nullable: false
- column:
name: instrucciones
type: VARCHAR(255)
constraints:
nullable: true
- column:
name: is_facturacion
type: TINYINT(1)
defaultValueNumeric: 0
constraints:
nullable: false
- column:
name: razon_social
type: VARCHAR(150)
constraints:
nullable: true
- column:
name: tipo_identificacion_fiscal
type: ENUM('DNI','NIE','CIF','Pasaporte','VAT_ID')
defaultValue: 'DNI'
constraints:
nullable: false
- column:
name: identificacion_fiscal
type: VARCHAR(50)
constraints:
nullable: true
- column:
name: created_by
type: BIGINT
constraints:
nullable: true
foreignKeyName: fk_direcciones_created
references: users(id)
onDelete: CASCADE
- column:
name: updated_by
type: BIGINT
constraints:
nullable: true
foreignKeyName: fk_direcciones_updated
references: users(id)
onDelete: CASCADE
- column:
name: deleted_by
type: BIGINT
constraints:
nullable: true
foreignKeyName: fk_direcciones_deleted
references: users(id)
onDelete: CASCADE
- column:
name: deleted
type: TINYINT(1)
defaultValueNumeric: 0
constraints:
nullable: false
- column:
name: created_at
type: TIMESTAMP
defaultValueComputed: CURRENT_TIMESTAMP
constraints:
nullable: false
- column:
name: updated_at
type: TIMESTAMP
defaultValueComputed: CURRENT_TIMESTAMP
constraints:
nullable: false
- column:
name: deleted_at
type: TIMESTAMP
constraints:
nullable: true

View File

@ -4,4 +4,6 @@ databaseChangeLog:
- include:
file: db/changelog/changesets/0002-create-pedidos.yml
- include:
file: db/changelog/changesets/0003-create-paises.yml
file: db/changelog/changesets/0003-create-paises.yml
- include:
file: db/changelog/changesets/0004-create-direcciones.yml