Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Avinya type #74

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions db/schema/8-asset.sql
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ CREATE TABLE IF NOT EXISTS resource_property (
-- consumable Supplier
CREATE TABLE IF NOT EXISTS supply (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
avinya_type_id INT DEFAULT NULL,
asset_id INT DEFAULT NULL,
consumable_id INT DEFAULT NULL,
supplier_id INT DEFAULT NULL,
Expand All @@ -65,6 +66,7 @@ CREATE TABLE IF NOT EXISTS supply (
order_amount INT DEFAULT 0,
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
FOREIGN KEY (avinya_type_id) REFERENCES avinya_type(id),
FOREIGN KEY (asset_id) REFERENCES asset(id),
FOREIGN KEY (consumable_id) REFERENCES consumable(id),
FOREIGN KEY (supplier_id) REFERENCES supplier(id),
Expand Down
1 change: 1 addition & 0 deletions db/schema/9-avinya_types.sql
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ INSERT INTO avinya_type (description, name, global_type, foundation_type, focus,
INSERT INTO avinya_type (description, name, global_type, foundation_type, focus, level) VALUES ('asset', 'laptop', 'Laptop', 'academic', 'empower', 700);
INSERT INTO avinya_type (description, name, global_type, foundation_type, focus, level) VALUES ('asset', 'accessories', 'Accessories', 'academic', 'empower', 500);
INSERT INTO avinya_type (description, name, global_type, foundation_type, focus, level) VALUES ('asset', 'stationary', 'Stationary', 'academic', 'empower', 400);
INSERT INTO avinya_type (description, name, global_type, foundation_type, focus, level) VALUES ('asset', 'sim', 'Sim', 'academic', 'empower', 550);

INSERT INTO avinya_type (description, name, global_type, foundation_type, focus, level) VALUES ('Arrival', 'arrival', 'meeting', 'academic', null, 3500);
INSERT INTO avinya_type (description, name, global_type, foundation_type, focus, level) VALUES ('Departure', 'departure', 'meeting', 'academic', null, 3500);
Expand Down