mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-23 01:00:23 +00:00
160 lines
4.6 KiB
YAML
160 lines
4.6 KiB
YAML
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
|