Open simonorono opened 7 years ago
What is estatus
? And how would you represent it in a migration?
This is the relevant part of the script (autogenerated) for that table:
create rule R_ESTATUS as
@column in ('ACTIVO','INACTIVO')
go
create type ESTATUS
from char(15) not null
go
execute sp_bindrule R_ESTATUS, ESTATUS
go
create table PERSONAS (
-- ...
ESTATUS ESTATUS not null default 'ACTIVO',
-- ...
)
go
So it seems to be a custom type? How would you represent it in a Laravel Migration? I don't think it supports custom types?
That particular case should be represented as an enum
.
Like this:
$table->enum('ESTATUS', ['ACTIVO', 'INACTIVO']);
Trying to generate migrations from SQL Server 2012