-
Notifications
You must be signed in to change notification settings - Fork 1
/
tables.sql
56 lines (48 loc) · 2.4 KB
/
tables.sql
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
/* ============================= */
create sequence code_push_seq
increment by 1
start with 10;
create table oraclegit_env (
environment_name varchar2(100) constraint oraclegit_env_pk primary key
, environment_value varchar2(4000)
);
insert into oraclegit_env values ('branch_level_setting', 'PRODMASTER');
insert into oraclegit_env values ('github_issues', 'N');
insert into oraclegit_env values ('privacy_level', 'PUBLIC');
insert into oraclegit_env values ('default_branch', 'DEV');
insert into oraclegit_env values ('multiple_schema_repos', 'N');
insert into oraclegit_env values ('github_wallet_location', 'file:/home/oracle/wallet');
insert into oraclegit_env values ('github_wallet_passwd', 'Manager123');
insert into oraclegit_env values ('github_api_location', 'https://api.github.com');
create table github_organization (
org_name varchar2(200) constraint github_org_pk primary key
);
create table github_account (
github_username varchar2(200) constraint github_account_pk primary key
, github_password varchar2(4000) constraint github_password_nn not null
, github_name varchar2(4000)
, github_email varchar2(4000)
, org_name varchar2(200) constraint github_account_org_ref references github_organization(org_name)
);
create table github_repository (
repository_name varchar2(4000) constraint gh_repos_pk primary key
, org_name varchar2(200) constraint gh_rep_org_ref references github_organization(org_name)
, repository_owner varchar2(200) constraint gh_rep_owner_ref references github_account(github_username)
, repository_branch varchar2(200) default 'DEV'
, issues_enabled varchar2(1) default 'N'
);
create table repository_schema (
schema_name varchar2(200) constraint rep_schema_pk primary key
, repository varchar2(4000) constraint schema_rep_ref references github_repository(repository_name)
);
create table repository_objects (
repository_name varchar2(4000) constraint object_rep_ref references github_repository(repository_name)
, schema_name varchar2(200) constraint object_schema_ref references repository_schema(schema_name)
, object_name varchar2(200) constraint object_name_nn not null
, object_type varchar2(200) constraint object_type_nn not null
, object_path varchar2(4000) constraint object_path_nn not null
);
create table repository_code_pushes (
code_push_id number constraint code_push_pk primary key
, code_data clob
);