Browse Source

Add lab schema

David Ginzberg 7 years ago
parent
commit
c4dfbaeab0
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      src/main/resources/schema-h2.sql

+ 11
- 0
src/main/resources/schema-h2.sql View File

@@ -17,6 +17,17 @@ CREATE TABLE HOME (
17 17
   PRIMARY KEY (ID)
18 18
 );
19 19
 
20
+DROP TABLE movies;
21
+
22
+CREATE TABLE movies (
23
+  id INT PRIMARY KEY AUTO_INCREMENT,
24
+  title VARCHAR2(100) NOT NULL UNIQUE,
25
+  runtime SMALLINT NOT NULL,
26
+  genre VARCHAR2(50),
27
+  imdb_score NUMBER(10,1),
28
+  rating VARCHAR2(10)
29
+);
30
+
20 31
 
21 32
 -- Tables for in-class example
22 33