瀏覽代碼

Add lab schema

David Ginzberg 7 年之前
父節點
當前提交
c4dfbaeab0
共有 1 個檔案被更改,包括 11 行新增0 行删除
  1. 11
    0
      src/main/resources/schema-h2.sql

+ 11
- 0
src/main/resources/schema-h2.sql 查看文件

@@ -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