xdoo / vaadin-demo

demo using vaadin with spring boot.
4 stars 2 forks source link

SQL für Flyway überarbeiten #60

Closed xdoo closed 9 years ago

xdoo commented 9 years ago

Es sind hier zwei Dinge zu tun:

  1. Trennung von DDL (create + alter...) und DML (insert).
  2. SQL so formatieren, dass es lesbar ist. Beispiel:
--drop tables
drop table ACCOUNTS if exists;
drop table USERS if exists;
drop table USERS_AUTHORITYS if exists;
drop table AUTHORITYS if exists;
drop table AUTHORITYS_PERMISSIONS if exists;
drop table PERMISSIONS if exists;
drop table COMPANYBASEINFOS if exists;

-- Accounts table
create table ACCOUNTS (
ID bigint generated by default as identity,
CREATED_BY varchar(255),
CREATED_DATE timestamp,
LAST_MOD_BY varchar(255),
LAST_MOD_DATE timestamp,
OID varchar(30) not null,
primary key (ID));