瀏覽代碼

Add schema for home and car

David Ginzberg 7 年之前
父節點
當前提交
5e6cde2ef2
共有 1 個文件被更改,包括 21 次插入1 次删除
  1. 21
    1
      src/main/resources/schema-h2.sql

+ 21
- 1
src/main/resources/schema-h2.sql 查看文件

@@ -4,10 +4,30 @@ CREATE TABLE PERSON (
4 4
   ID NUMBER(10,0) NOT NULL AUTO_INCREMENT,
5 5
   FIRST_NAME VARCHAR2(255) NOT NULL DEFAULT '',
6 6
   LAST_NAME VARCHAR2(255) NOT NULL DEFAULT '',
7
-  MOBILE VARCHAR(20) NOT NULL DEFAULT '',
7
+  MOBILE VARCHAR2(20) NOT NULL DEFAULT '',
8 8
   BIRTHDAY DATE DEFAULT NULL,
9 9
   PRIMARY KEY (ID));
10 10
 
11
+DROP TABLE HOME;
12
+
13
+CREATE TABLE HOME (
14
+  ID NUMBER(10,0) NOT NULL AUTO_INCREMENT,
15
+  ADDRESS VARCHAR2(255) not null default '',
16
+  HOMENUMBER varchar2(255) NOT NULL DEFAULT '',
17
+  PRIMARY KEY (ID)
18
+);
19
+
20
+
21
+DROP TABLE CAR;
22
+
23
+CREATE TABLE CAR (
24
+  ID NUMBER(10,0) NOT NULL AUTO_INCREMENT,
25
+  MAKE VARCHAR2(255) not null default '',
26
+  MODEL varchar2(255) NOT NULL DEFAULT '',
27
+  YEAR VARCHAR2(5) NOT NULL DEFAULT '01907',
28
+  PRIMARY KEY (ID)
29
+);
30
+
11 31
 DROP SEQUENCE hibernate_sequence;
12 32
 
13 33
 CREATE SEQUENCE hibernate_sequence;