-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrate from drizzle to atdatabase (#1986)
some formatting changes occured on unrelated files
- Loading branch information
Showing
211 changed files
with
271,069 additions
and
25,446 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CREATE TABLE | ||
if not exists attachment_point ( | ||
attachment_point_id INTEGER NOT NULL, | ||
attachment_point VARCHAR(100) NOT NULL, | ||
CONSTRAINT SYS_PK_11761 PRIMARY KEY (attachment_point_id) | ||
); | ||
|
||
CREATE UNIQUE INDEX SYS_IDX_SYS_PK_11761_11762 ON attachment_point (attachment_point_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
create table | ||
if not exists brand ( | ||
brand_id INTEGER NOT NULL, | ||
brand VARCHAR(100) NULL, | ||
pic_name VARCHAR(50) NULL, | ||
is_stock SMALLINT default 0, | ||
CONSTRAINT SYS_PK_11763 PRIMARY KEY (brand_id) | ||
); | ||
|
||
CREATE UNIQUE INDEX SYS_IDX_SYS_PK_11795_11796 ON brand (brand_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
CREATE TABLE | ||
if not exists model ( | ||
model_id INTEGER NOT NULL, | ||
brand_id INTEGER NOT NULL, | ||
e_model VARCHAR(100), | ||
g_model VARCHAR(100), | ||
f_model VARCHAR(100), | ||
s_model VARCHAR(100), | ||
i_model VARCHAR(100), | ||
j_model VARCHAR(100), | ||
sw_model VARCHAR(100), | ||
b_model VARCHAR(100), | ||
e_extra_info VARCHAR(100), | ||
g_extra_info VARCHAR(100), | ||
f_extra_info VARCHAR(100), | ||
s_extra_info VARCHAR(100), | ||
i_extra_info VARCHAR(100), | ||
j_extra_info VARCHAR(100), | ||
sw_extra_info VARCHAR(100), | ||
b_extra_info VARCHAR(100), | ||
e_short_model VARCHAR(50), | ||
g_short_model VARCHAR(50), | ||
f_short_model VARCHAR(50), | ||
s_short_model VARCHAR(50), | ||
i_short_model VARCHAR(50), | ||
j_short_model VARCHAR(50), | ||
sw_short_model VARCHAR(50), | ||
b_short_model VARCHAR(50), | ||
debug_string VARCHAR(255), | ||
debug_sort_string VARCHAR(50), | ||
CONSTRAINT SYS_PK_11927 PRIMARY KEY (model_id), | ||
CONSTRAINT MODEL_R_172 FOREIGN KEY (brand_id) REFERENCES brand (brand_id) | ||
); | ||
|
||
CREATE INDEX SYS_IDX_MODEL_R_172_12422 ON model (brand_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
CREATE TABLE | ||
IF NOT EXISTS abstract_part_type ( | ||
abstract_part_type_id INTEGER NOT NULL, | ||
parent_abstract_part_type_id INTEGER, | ||
depends_on INTEGER, | ||
part_filename VARCHAR(20), | ||
eapt VARCHAR(100) NOT NULL, | ||
gapt VARCHAR(100), | ||
faft VARCHAR(100), | ||
saft VARCHAR(100), | ||
iaft VARCHAR(100), | ||
jaft VARCHAR(100), | ||
sw_aft VARCHAR(100), | ||
baft VARCHAR(100), | ||
modified_rule INTEGER DEFAULT 0, | ||
eut TEXT, | ||
gut TEXT, | ||
fut TEXT, | ||
sut TEXT, | ||
iut TEXT, | ||
jut TEXT, | ||
swut TEXT, | ||
but TEXT, | ||
part_paired INTEGER DEFAULT 0, | ||
schematic_picname1 VARCHAR(9), | ||
schematic_picname2 VARCHAR(9), | ||
block_family_compatibility INTEGER DEFAULT 0, | ||
repair_cost_modifier NUMERIC(100, 7) DEFAULT 0, | ||
scrap_value_modifier NUMERIC(100, 7) DEFAULT 0, | ||
garage_category INTEGER DEFAULT 0, | ||
CONSTRAINT sys_pk_11740 PRIMARY KEY (abstract_part_type_id), | ||
CONSTRAINT abstractparttype_r_191 FOREIGN KEY (depends_on) REFERENCES abstract_part_type (abstract_part_type_id), | ||
CONSTRAINT abstractparttype_r2 FOREIGN KEY (parent_abstract_part_type_id) REFERENCES abstract_part_type (abstract_part_type_id) | ||
); | ||
|
||
CREATE INDEX sys_idx_abstractparttype_r_191_15170 ON abstract_part_type (depends_on); | ||
|
||
CREATE INDEX sys_idx_abstractparttype_r2_15181 ON abstract_part_type (parent_abstract_part_type_id); | ||
|
||
CREATE UNIQUE INDEX sys_idx_sys_pk_11740_11741 ON abstract_part_type (abstract_part_type_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CREATE TABLE | ||
IF NOT EXISTS part_grade ( | ||
part_grade_id INTEGER NOT NULL, | ||
e_text VARCHAR(50), | ||
g_text VARCHAR(50), | ||
f_text VARCHAR(50), | ||
part_grade VARCHAR(50), | ||
CONSTRAINT sys_pk_11985 PRIMARY KEY (part_grade_id) | ||
); | ||
|
||
CREATE UNIQUE INDEX sys_idx_sys_pk_11985_11986 ON part_grade (part_grade_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
CREATE TABLE | ||
IF NOT EXISTS part_type ( | ||
part_type_id INTEGER NOT NULL, | ||
abstract_part_type_id INTEGER NOT NULL, | ||
part_type VARCHAR(100) NOT NULL, | ||
part_filename VARCHAR(20), | ||
part_grade_id INTEGER, | ||
CONSTRAINT sys_pk_11991 PRIMARY KEY (part_type_id), | ||
CONSTRAINT parttype_abstractparttypeparttype FOREIGN KEY (abstract_part_type_id) REFERENCES abstract_part_type (abstract_part_type_id), | ||
CONSTRAINT parttype_partgradeparttype FOREIGN KEY (part_grade_id) REFERENCES part_grade (part_grade_id) | ||
); | ||
|
||
CREATE INDEX sys_idx_parttype_abstractparttypeparttype_12453 ON part_type (abstract_part_type_id); | ||
|
||
CREATE INDEX sys_idx_parttype_partgradeparttype_12463 ON part_type (part_grade_id); | ||
|
||
CREATE UNIQUE INDEX sys_idx_sys_pk_11991_11992 ON part_type (part_type_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
CREATE TABLE | ||
IF NOT EXISTS branded_part ( | ||
branded_part_id INTEGER NOT NULL, | ||
part_type_id INTEGER NOT NULL, | ||
model_id INTEGER NOT NULL, | ||
mfg_date TIMESTAMP NOT NULL, | ||
qty_avail INTEGER NOT NULL, | ||
retail_price INTEGER NOT NULL, | ||
max_item_wear SMALLINT, | ||
engine_block_family_id INTEGER DEFAULT 0 NOT NULL, | ||
CONSTRAINT sys_pk_11801 PRIMARY KEY (branded_part_id), | ||
CONSTRAINT brandedpart_modelbrandedpart FOREIGN KEY (model_id) REFERENCES model (model_id), | ||
CONSTRAINT brandedpart_parttypebrandedpart1 FOREIGN KEY (part_type_id) REFERENCES part_type (part_type_id) | ||
); | ||
|
||
CREATE INDEX brandedpart_engineblockfamilyid ON branded_part (engine_block_family_id); | ||
|
||
CREATE INDEX sys_idx_brandedpart_modelbrandedpart_12255 ON branded_part (model_id); | ||
|
||
CREATE INDEX sys_idx_brandedpart_parttypebrandedpart1_12269 ON branded_part (part_type_id); | ||
|
||
CREATE UNIQUE INDEX sys_idx_sys_pk_11801_11802 ON branded_part (branded_part_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
CREATE TABLE | ||
IF NOT EXISTS part ( | ||
part_id INTEGER NOT NULL, | ||
parent_part_id INTEGER, | ||
branded_part_id INTEGER NOT NULL, | ||
percent_damage SMALLINT NOT NULL, | ||
item_wear INTEGER NOT NULL, | ||
attachment_point_id INTEGER, | ||
owner_id INTEGER, | ||
part_name VARCHAR(100), | ||
repair_cost INTEGER DEFAULT 0, | ||
scrap_value INTEGER DEFAULT 0, | ||
CONSTRAINT sys_pk_11976 PRIMARY KEY (part_id), | ||
CONSTRAINT part_brandedpartpart FOREIGN KEY (branded_part_id) REFERENCES branded_part (branded_part_id), | ||
CONSTRAINT part_r25 FOREIGN KEY (parent_part_id) REFERENCES part (part_id), | ||
CONSTRAINT part_r9 FOREIGN KEY (attachment_point_id) REFERENCES attachment_point (attachment_point_id) | ||
); | ||
|
||
CREATE INDEX sys_idx_part_brandedpartpart_12431 ON part (branded_part_id); | ||
|
||
CREATE INDEX sys_idx_part_r25_15192 ON part (parent_part_id); | ||
|
||
CREATE INDEX sys_idx_part_r9_12442 ON part (attachment_point_id); | ||
|
||
CREATE UNIQUE INDEX sys_idx_sys_pk_11976_11977 ON part (part_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CREATE TABLE | ||
IF NOT EXISTS driver_class ( | ||
driver_class_id SMALLINT NOT NULL, | ||
driver_class VARCHAR(50), | ||
CONSTRAINT sys_pk_11831 PRIMARY KEY (driver_class_id) | ||
); | ||
|
||
CREATE UNIQUE INDEX sys_idx_sys_pk_11831_11832 ON driver_class (driver_class_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CREATE TABLE | ||
IF NOT EXISTS player_type ( | ||
player_type_id INTEGER NOT NULL, | ||
player_type VARCHAR(100) NOT NULL, | ||
CONSTRAINT sys_pk_12040 PRIMARY KEY (player_type_id) | ||
); | ||
|
||
CREATE UNIQUE INDEX sys_idx_sys_pk_12040_12041 ON player_type (player_type_id); |
Oops, something went wrong.