-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathBloomer-CORE.script
77 lines (77 loc) · 5.51 KB
/
Bloomer-CORE.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
SET DATABASE UNIQUE NAME HSQLDB3DCAC8C555
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 REGULAR NAMES TRUE
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 NULLS FIRST TRUE
SET DATABASE SQL UNIQUE NULLS TRUE
SET DATABASE SQL CONVERT TRUNCATE TRUE
SET DATABASE SQL AVG SCALE 0
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 CONFLICT 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 32
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.JOGO(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,NOME VARCHAR(100) NOT NULL,VERSION INTEGER,CONFIGURADOR BIGINT,TIPO BIGINT NOT NULL)
ALTER TABLE PUBLIC.JOGO ALTER COLUMN ID RESTART WITH 2
CREATE MEMORY TABLE PUBLIC.PARTIDA(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,ACERTO INTEGER NOT NULL,CONCLUIU BOOLEAN NOT NULL,DATA_HORA TIMESTAMP NOT NULL,ESCORE INTEGER NOT NULL,VERSION INTEGER,JOGO BIGINT,USUARIO BIGINT,CHECK((PUBLIC.PARTIDA.ACERTO>=0) AND (PUBLIC.PARTIDA.ACERTO<=100)),CONSTRAINT FKD0BCC9D37CB63FDB FOREIGN KEY(JOGO) REFERENCES PUBLIC.JOGO(ID))
ALTER TABLE PUBLIC.PARTIDA ALTER COLUMN ID RESTART WITH 1
CREATE MEMORY TABLE PUBLIC.QUESTAO(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,GABARITO CLOB(255),VERSION INTEGER,JOGO BIGINT,TIPO BIGINT,CONSTRAINT FK270C74907CB63FDB FOREIGN KEY(JOGO) REFERENCES PUBLIC.JOGO(ID))
ALTER TABLE PUBLIC.QUESTAO ALTER COLUMN ID RESTART WITH 1
CREATE MEMORY TABLE PUBLIC.RELACAO(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,DATA_INICIO TIMESTAMP NOT NULL,VERSION INTEGER,DESTINO BIGINT,ORIGEM BIGINT)
ALTER TABLE PUBLIC.RELACAO ALTER COLUMN ID RESTART WITH 1
CREATE MEMORY TABLE PUBLIC.RESPOSTA(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,CONTEUDO CLOB(255),VERSION INTEGER,PARTIDA BIGINT,QUESTAO BIGINT,CONSTRAINT FKEBB7272128D1C205 FOREIGN KEY(PARTIDA) REFERENCES PUBLIC.PARTIDA(ID),CONSTRAINT FKEBB72721D571177F FOREIGN KEY(QUESTAO) REFERENCES PUBLIC.QUESTAO(ID))
ALTER TABLE PUBLIC.RESPOSTA ALTER COLUMN ID RESTART WITH 1
CREATE MEMORY TABLE PUBLIC.TIPO_JOGO(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,AUTOR VARCHAR(100) NOT NULL,DESCRICAO VARCHAR(2000) NOT NULL,NOME VARCHAR(100) NOT NULL,PLATAFORMA INTEGER,VERSION INTEGER)
ALTER TABLE PUBLIC.TIPO_JOGO ALTER COLUMN ID RESTART WITH 2
CREATE MEMORY TABLE PUBLIC.TIPO_JOGO_NIVEIS_TAXONOMIA(TIPO_JOGO BIGINT NOT NULL,NIVEIS_TAXONOMIA INTEGER,CONSTRAINT FKC0D18D5C9F70AADA FOREIGN KEY(TIPO_JOGO) REFERENCES PUBLIC.TIPO_JOGO(ID))
CREATE MEMORY TABLE PUBLIC.TIPO_QUESTAO(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,DESCRICAO VARCHAR(2000) NOT NULL,NOME VARCHAR(100) NOT NULL,VERSION INTEGER,JOGO BIGINT,CONSTRAINT FK6BB5FA85EDB464AF FOREIGN KEY(JOGO) REFERENCES PUBLIC.TIPO_JOGO(ID))
ALTER TABLE PUBLIC.TIPO_QUESTAO ALTER COLUMN ID RESTART WITH 3
CREATE MEMORY TABLE PUBLIC.USUARIO(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,DATA_NASCIMENTO TIMESTAMP,LOGIN VARCHAR(255) NOT NULL,NOME VARCHAR(150) NOT NULL,SENHA VARCHAR(30) NOT NULL,SEXO INTEGER,VERSION INTEGER)
ALTER TABLE PUBLIC.USUARIO ALTER COLUMN ID RESTART WITH 2
ALTER TABLE PUBLIC.JOGO ADD CONSTRAINT FK31DCEDEDB8DAF6 FOREIGN KEY(TIPO) REFERENCES PUBLIC.TIPO_JOGO(ID)
ALTER TABLE PUBLIC.JOGO ADD CONSTRAINT FK31DCEDC534C0B2 FOREIGN KEY(CONFIGURADOR) REFERENCES PUBLIC.USUARIO(ID)
ALTER TABLE PUBLIC.PARTIDA ADD CONSTRAINT FKD0BCC9D3778214BB FOREIGN KEY(USUARIO) REFERENCES PUBLIC.USUARIO(ID)
ALTER TABLE PUBLIC.QUESTAO ADD CONSTRAINT FK270C7490C59AB0CF FOREIGN KEY(TIPO) REFERENCES PUBLIC.TIPO_QUESTAO(ID)
ALTER TABLE PUBLIC.RELACAO ADD CONSTRAINT FK40FF5BE9DC409F95 FOREIGN KEY(DESTINO) REFERENCES PUBLIC.USUARIO(ID)
ALTER TABLE PUBLIC.RELACAO ADD CONSTRAINT FK40FF5BE9434ED036 FOREIGN KEY(ORIGEM) 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 JOGO VALUES(1,'Turma Rodrigo Vilar',0,1,1)
INSERT INTO TIPO_JOGO VALUES(1,'PIBID','Descri\u00e7\u00e3o Entrando Pelo Cano','Entrando Pelo Cano',1,0)
INSERT INTO TIPO_JOGO_NIVEIS_TAXONOMIA VALUES(1,0)
INSERT INTO TIPO_QUESTAO VALUES(2,'Descri\u00e7\u00e3o Tipo Quest\u00e3o 1','Tipo Quest\u00e3o 1',0,1)
INSERT INTO USUARIO VALUES(1,'1992-05-15 00:00:00.000000','sinval','Sinval Vieira','123456',0,0)