From: Chris Sharp Date: Mon, 9 Nov 2020 14:30:02 +0000 (-0500) Subject: beginnings X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e29513d3d1bd748d74614a4442a34da69a2a4efd;p=evergreen%2Fpines.git beginnings Signed-off-by: Chris Sharp --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index a609dcaa69..f412ce755c 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -15559,6 +15559,35 @@ SELECT usr, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/src/sql/Pg/600.schema.student_card.sql b/Open-ILS/src/sql/Pg/600.schema.student_card.sql new file mode 100644 index 0000000000..73f93bedd8 --- /dev/null +++ b/Open-ILS/src/sql/Pg/600.schema.student_card.sql @@ -0,0 +1,44 @@ +BEGIN; + +CREATE SCHEMA student_card; + +CREATE TABLE student_card.district ( + id SERIAL PRIMARY KEY, + code TEXT NOT NULL UNIQUE, + name TEXT NOT NULL UNIQUE, + state_id INTEGER NOT NULL UNIQUE, + contact_name TEXT, + contact_email TEXT, + remote_host TEXT NOT NULL, + remote_user TEXT, + remote_pass VARCHAR(255), --TODO: encrypt this data with PGP? + remote_remote_dir TEXT, + exceptions_dir TEXT +); + +CREATE TABLE student_card.school ( + id SERIAL PRIMARY KEY, + district_id INTEGER NOT NULL REFERENCES student_card.district (id), + name TEXT NOT NULL UNIQUE, + state_id INTEGER NOT NULL, + grades TEXT, + addr_street_1 TEXT, + addr_street_2 TEXT, + addr_city TEXT, + addr_county TEXT, + addr_state TEXT, + addr_post_code TEXT, + eg_perm_group INTEGER NOT NULL REFERENCES permission.grp_tree (id), + home_ou INTEGER NOT NULL REFERENCES actor.org_unit (id) +); +CREATE UNIQUE INDEX student_card_school_state_id_idx ON student_card.school (district_id, state_id); + +CREATE TABLE student_card.import ( + id SERIAL PRIMARY KEY, + import_time TIMESTAMPTZ NOT NULL DEFAULT NOW(), + district_id INTEGER NOT NULL REFERENCES student_card.district (id), + filename TEXT, + error_message TEXT +); + +COMMIT;