Create a table that lists all possible saves (e.g. csbt_save_table), so it can be used when looking up saves from csbt_character_save_table. As of v0.8.2, the save_name is a free-text input field.
This change would require a schema change. Something like:
CREATE TABLE csbt_save_table (
save_id serial NOT NULL PRIMARY KEY,
save_name text NOT NULL UNIQUE
);
ALTER TABLE csbt_character_save_table ADD COLUMN save_id integer;
ALTER TABLE csbt_character_save_table ADD CONSTRAINT csbt_character_save_table_save_id_fkey FOREIGN KEY (save_id) REFERENCES csbt_save_table (save_id);
INSERT INTO csbt_save_table (save_name)
SELECT distinct(save_name) FROM csbt_character_save_table;
ALTER TABLE csbt_character_save_table DROP COLUMN save_name;
After further consideration, it seems like the association of ability to save should go on this new table (csbt_ability_table) instead of remaining on the character's save record.
Create a table that lists all possible saves (e.g.
csbt_save_table
), so it can be used when looking up saves fromcsbt_character_save_table
. As of v0.8.2, thesave_name
is a free-text input field.This change would require a schema change. Something like: