X-Git-Url: https://juplo.de/gitweb/?p=hibernate4-maven-plugin;a=blobdiff_plain;f=src%2Fit%2Fschemaexport-example%2Fschema.sql;fp=src%2Fit%2Fschemaexport-example%2Fschema.sql;h=e8f93baefe584a1592a0f65f655a2d7e171e07ee;hp=0000000000000000000000000000000000000000;hb=69458703cddc2aea1f67e06db43bce6950c6f3cb;hpb=a53a2ad438038084200a8449c557a41159e409dc diff --git a/src/it/schemaexport-example/schema.sql b/src/it/schemaexport-example/schema.sql new file mode 100644 index 00000000..e8f93bae --- /dev/null +++ b/src/it/schemaexport-example/schema.sql @@ -0,0 +1,25 @@ + + alter table Employee + drop constraint FK_12v0w2dqasbw95xtn8qc2uj83; + + drop table ABTEILUNG if exists; + + drop table Employee if exists; + + create table ABTEILUNG ( + OID bigint generated by default as identity (start with 1), + name varchar(255) not null, + primary key (OID) + ); + + create table Employee ( + OID bigint generated by default as identity (start with 1), + name varchar(81) not null, + FK_department bigint, + primary key (OID) + ); + + alter table Employee + add constraint FK_12v0w2dqasbw95xtn8qc2uj83 + foreign key (FK_department) + references ABTEILUNG;