forked from caelum/pm-75-leiloes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathleiloes.db.script
59 lines (59 loc) · 2.93 KB
/
leiloes.db.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
SET DATABASE UNIQUE NAME HSQLDB745E83910C
SET DATABASE GC 0
SET DATABASE DEFAULT RESULT MEMORY ROWS 0
SET DATABASE EVENT LOG LEVEL 0
SET DATABASE SQL NAMES FALSE
SET DATABASE SQL REFERENCES FALSE
SET DATABASE SQL SIZE TRUE
SET DATABASE SQL TYPES FALSE
SET DATABASE SQL TDC DELETE TRUE
SET DATABASE SQL TDC UPDATE TRUE
SET DATABASE SQL TRANSLATE TTI TYPES TRUE
SET DATABASE SQL CONCAT NULLS TRUE
SET DATABASE SQL UNIQUE NULLS TRUE
SET DATABASE SQL CONVERT TRUNCATE TRUE
SET DATABASE SQL DOUBLE NAN TRUE
SET DATABASE SQL LONGVAR IS LOB FALSE
SET DATABASE TRANSACTION CONTROL LOCKS
SET DATABASE DEFAULT ISOLATION LEVEL READ COMMITTED
SET DATABASE TRANSACTION ROLLBACK ON DEADLOCK TRUE
SET DATABASE TEXT TABLE DEFAULTS ''
SET FILES WRITE DELAY 500 MILLIS
SET FILES BACKUP INCREMENT TRUE
SET FILES CACHE SIZE 10000
SET FILES CACHE ROWS 50000
SET FILES SCALE 8
SET FILES LOB SCALE 32
SET FILES DEFRAG 0
SET FILES NIO TRUE
SET FILES NIO SIZE 256
SET FILES LOG TRUE
SET FILES LOG SIZE 50
CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e'
ALTER USER SA SET LOCAL TRUE
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
SET SCHEMA PUBLIC
CREATE MEMORY TABLE PUBLIC.LANCE(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,DATA TIMESTAMP,VALOR DOUBLE NOT NULL,LEILAO_ID BIGINT,USUARIO_ID BIGINT)
ALTER TABLE PUBLIC.LANCE ALTER COLUMN ID RESTART WITH 4
CREATE MEMORY TABLE PUBLIC.LEILAO(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,DATAABERTURA TIMESTAMP,NOME VARCHAR(255),USADO BIT(1) NOT NULL,VALORINICIAL DOUBLE,USUARIO_ID BIGINT)
ALTER TABLE PUBLIC.LEILAO ALTER COLUMN ID RESTART WITH 10
CREATE MEMORY TABLE PUBLIC.USUARIO(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,EMAIL VARCHAR(255),NOME VARCHAR(255))
ALTER TABLE PUBLIC.USUARIO ALTER COLUMN ID RESTART WITH 36
ALTER TABLE PUBLIC.LANCE ADD CONSTRAINT FK45CBB9B2E297AC3 FOREIGN KEY(USUARIO_ID) REFERENCES PUBLIC.USUARIO(ID)
ALTER TABLE PUBLIC.LANCE ADD CONSTRAINT FK45CBB9BCCF67091 FOREIGN KEY(LEILAO_ID) REFERENCES PUBLIC.LEILAO(ID)
ALTER TABLE PUBLIC.LEILAO ADD CONSTRAINT FK8770F1AA2E297AC3 FOREIGN KEY(USUARIO_ID) REFERENCES PUBLIC.USUARIO(ID)
ALTER SEQUENCE SYSTEM_LOBS.LOB_ID RESTART WITH 1
SET DATABASE DEFAULT INITIAL SCHEMA PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.YES_OR_NO TO PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.TIME_STAMP TO PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CARDINAL_NUMBER TO PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CHARACTER_DATA TO PUBLIC
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.SQL_IDENTIFIER TO PUBLIC
GRANT DBA TO SA
SET SCHEMA SYSTEM_LOBS
INSERT INTO BLOCKS VALUES(0,2147483647,0)
SET SCHEMA PUBLIC
INSERT INTO LANCE VALUES(3,'2020-09-06 15:57:45.161000',150.0E0,9,35)
INSERT INTO LEILAO VALUES(9,'2020-09-06 15:57:44.199000','Geladeira','0',100.0E0,34)
INSERT INTO USUARIO VALUES(34,'paulo@henrique.com','Paulo Henrique')
INSERT INTO USUARIO VALUES(35,'jose@eduardo.com','Jos\u00e9 Eduardo')