Pārlūkot izejas kodu

Add schema for home and car

David Ginzberg 7 gadus atpakaļ
vecāks
revīzija
5e6cde2ef2
1 mainītis faili ar 21 papildinājumiem un 1 dzēšanām
  1. 21
    1
      src/main/resources/schema-h2.sql

+ 21
- 1
src/main/resources/schema-h2.sql Parādīt failu

4
   ID NUMBER(10,0) NOT NULL AUTO_INCREMENT,
4
   ID NUMBER(10,0) NOT NULL AUTO_INCREMENT,
5
   FIRST_NAME VARCHAR2(255) NOT NULL DEFAULT '',
5
   FIRST_NAME VARCHAR2(255) NOT NULL DEFAULT '',
6
   LAST_NAME VARCHAR2(255) NOT NULL DEFAULT '',
6
   LAST_NAME VARCHAR2(255) NOT NULL DEFAULT '',
7
-  MOBILE VARCHAR(20) NOT NULL DEFAULT '',
7
+  MOBILE VARCHAR2(20) NOT NULL DEFAULT '',
8
   BIRTHDAY DATE DEFAULT NULL,
8
   BIRTHDAY DATE DEFAULT NULL,
9
   PRIMARY KEY (ID));
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
 DROP SEQUENCE hibernate_sequence;
31
 DROP SEQUENCE hibernate_sequence;
12
 
32
 
13
 CREATE SEQUENCE hibernate_sequence;
33
 CREATE SEQUENCE hibernate_sequence;