mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-24 09:40:21 +00:00
terminado (provisional) modulo de facturas
This commit is contained in:
@ -48,7 +48,7 @@ databaseChangeLog:
|
||||
sql: |
|
||||
INSERT INTO variables (clave, valor)
|
||||
SELECT
|
||||
'sere_facturacion_rect_default',
|
||||
'serie_facturacion_rect_default',
|
||||
CAST(sf.id AS CHAR)
|
||||
FROM series_facturas sf
|
||||
WHERE sf.prefijo = 'REC IL'
|
||||
|
||||
@ -0,0 +1,114 @@
|
||||
databaseChangeLog:
|
||||
- changeSet:
|
||||
id: create-facturas-direcciones
|
||||
author: jjo
|
||||
|
||||
changes:
|
||||
- createTable:
|
||||
tableName: facturas_direcciones
|
||||
columns:
|
||||
- column:
|
||||
name: id
|
||||
type: BIGINT
|
||||
autoIncrement: true
|
||||
constraints:
|
||||
primaryKey: true
|
||||
nullable: false
|
||||
|
||||
- column:
|
||||
name: factura_id
|
||||
type: BIGINT
|
||||
constraints:
|
||||
nullable: false
|
||||
|
||||
- column:
|
||||
name: unidades
|
||||
type: MEDIUMINT UNSIGNED
|
||||
|
||||
- column:
|
||||
name: email
|
||||
type: VARCHAR(255)
|
||||
|
||||
- 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)
|
||||
defaultValue: esp
|
||||
constraints:
|
||||
nullable: false
|
||||
|
||||
- column:
|
||||
name: telefono
|
||||
type: VARCHAR(30)
|
||||
|
||||
- column:
|
||||
name: instrucciones
|
||||
type: VARCHAR(255)
|
||||
|
||||
- column:
|
||||
name: razon_social
|
||||
type: VARCHAR(150)
|
||||
|
||||
- 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)
|
||||
|
||||
- column:
|
||||
name: created_at
|
||||
type: TIMESTAMP
|
||||
defaultValueComputed: CURRENT_TIMESTAMP
|
||||
constraints:
|
||||
nullable: false
|
||||
|
||||
- addForeignKeyConstraint:
|
||||
constraintName: fk_facturas_direcciones_factura
|
||||
baseTableName: facturas_direcciones
|
||||
baseColumnNames: factura_id
|
||||
referencedTableName: facturas
|
||||
referencedColumnNames: id
|
||||
onDelete: CASCADE
|
||||
onUpdate: RESTRICT
|
||||
|
||||
rollback:
|
||||
- dropForeignKeyConstraint:
|
||||
baseTableName: facturas_direcciones
|
||||
constraintName: fk_facturas_direcciones_factura
|
||||
|
||||
- dropTable:
|
||||
tableName: facturas_direcciones
|
||||
Reference in New Issue
Block a user