CREATE TABLE student_card.school (
id SERIAL PRIMARY KEY,
district_id INTEGER NOT NULL REFERENCES student_card.district (id),
- name TEXT NOT NULL UNIQUE,
+ name TEXT NOT NULL,
state_id INTEGER NOT NULL, -- school ID per the State of Georgia
grades TEXT,
addr_street_1 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 UNIQUE INDEX student_card_school_state_id_once_per_district_idx ON student_card.school (district_id, state_id);
+CREATE UNIQUE INDEX student_card_school_name_once_per_district_idx ON student_card.school (district_id, name);
CREATE TABLE student_card.import (
id SERIAL PRIMARY KEY,
);
INSERT INTO permission.perm_list ( id, code, description ) VALUES
- ( 628, 'ADMIN_STUDENT_CARDS', oils_i18n_gettext(628,
+ ( 636, 'ADMIN_STUDENT_CARDS', oils_i18n_gettext(636,
'Modify student card settings', 'ppl', 'description'));
INSERT INTO config.org_unit_setting_type