/* * * Script to update the xtoss schema between version 15 and 16. */ /* * injury_phases modifications * */ /* * Weather additions * */ ALTER TABLE american_football_action_participants ADD score_credit INTEGER; GO ALTER TABLE american_football_action_participants ADD yards_gained INTEGER; GO ALTER TABLE weather_conditions ADD weather_code VARCHAR(100); GO ALTER TABLE weather_conditions ADD temperature_units VARCHAR(100); GO ALTER TABLE core_person_stats ALTER COLUMN position_id INT NULL; GO /* * Renaming a column ALTER TABLE baseball_action_pitches ADD COLUMN baseball_action_play_id INTEGER NOT NULL; GO UPDATE baseball_action_pitches SET baseball_action_play_id = baseball_event_state_id; GO * */ /* * NEED TO SYNCRONIZE WITH LATEST UPDATES IN POSTGRES TRANSITON FILE * */ /* * retname baseball_action_pitches baseball_event_state_id to baseball_action_play_id * */ sp_rename "baseball_action_pitches.baseball_event_state_id", baseball_action_play_id, 'COLUMN'; GO ALTER TABLE baseball_event_state_id ALTER COLUMN baseball_action_play_id INT NOT NULL;