r625 - trunk/faxtomail-service/src/main/resources/db/migration/sqlserver
Author: echatellier Date: 2014-09-18 14:54:30 +0200 (Thu, 18 Sep 2014) New Revision: 625 Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/625 Log: Correction du code de migration SQL server Modified: trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_620__modification_newclient_edireturn.sql Modified: trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_620__modification_newclient_edireturn.sql =================================================================== --- trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_620__modification_newclient_edireturn.sql 2014-09-18 12:52:45 UTC (rev 624) +++ trunk/faxtomail-service/src/main/resources/db/migration/sqlserver/V1_0_0_620__modification_newclient_edireturn.sql 2014-09-18 12:54:30 UTC (rev 625) @@ -4,13 +4,13 @@ GO create table newClient ( name varchar(MAX), - emailAddress varchar(MAX), - faxNumber varchar(MAX), + emailAddress varchar(255), + faxNumber varchar(255), caracteristic1 varchar(MAX), caracteristic2 varchar(MAX), caracteristic3 varchar(MAX), - code varchar(MAX) not null, - company varchar(MAX) not null, + code varchar(255) not null, + company varchar(255) not null, brand varchar(MAX), personInCharge varchar(MAX), unique (code, company, emailAddress, faxNumber) @@ -35,14 +35,16 @@ -- add company in client --drop constraint UK_b4ck8pelycojqmbrd8n36mdfw; -alter table client drop emailAddress; -alter table client drop faxNumber; -alter table client drop id; +alter table client drop column emailAddress; +alter table client drop column faxNumber; +alter table client drop column id; -alter table client add company text not NULL; +alter table client add company varchar(255) not NULL; alter table client add emailAddressesJson varchar(MAX); alter table client add faxNumbersJson varchar(MAX); -alter table client alter brand drop not NULL; +alter table client alter column code varchar(255) not NULL; +alter table client alter column brand varchar(MAX) not NULL; + alter table client add constraint UK_kqpy7y2f4onck5julevr0hfg1 unique (code, company); GO
participants (1)
-
echatellier@users.forge.codelutin.com