67 lines
1.4 KiB
PL/PgSQL
67 lines
1.4 KiB
PL/PgSQL
-- Convert schema '/home/sergio/LasTres/script/../dbicdh/_source/deploy/1/001-auto.yml' to '/home/sergio/LasTres/script/../dbicdh/_source/deploy/4/001-auto.yml':;
|
|
|
|
;
|
|
BEGIN;
|
|
|
|
;
|
|
ALTER TABLE player_pjs DROP CONSTRAINT player_pjs_fk_owner;
|
|
|
|
;
|
|
ALTER TABLE player_pjs DROP CONSTRAINT player_pjs_fk_stats;
|
|
|
|
;
|
|
DROP INDEX player_pjs_idx_stats;
|
|
|
|
;
|
|
ALTER TABLE player_pjs DROP COLUMN level;
|
|
|
|
;
|
|
ALTER TABLE player_pjs DROP COLUMN exp;
|
|
|
|
;
|
|
ALTER TABLE player_pjs DROP COLUMN stats;
|
|
|
|
;
|
|
ALTER TABLE player_pjs ADD COLUMN experience integer DEFAULT 1 NOT NULL;
|
|
|
|
;
|
|
ALTER TABLE player_pjs ADD COLUMN born_stats uuid NOT NULL;
|
|
|
|
;
|
|
ALTER TABLE player_pjs ADD COLUMN training_stats uuid NOT NULL;
|
|
|
|
;
|
|
ALTER TABLE player_pjs ADD COLUMN health integer NOT NULL;
|
|
|
|
;
|
|
ALTER TABLE player_pjs ADD COLUMN mana integer NOT NULL;
|
|
|
|
;
|
|
CREATE INDEX player_pjs_idx_born_stats on player_pjs (born_stats);
|
|
|
|
;
|
|
CREATE INDEX player_pjs_idx_training_stats on player_pjs (training_stats);
|
|
|
|
;
|
|
ALTER TABLE player_pjs ADD CONSTRAINT player_pjs_fk_born_stats FOREIGN KEY (born_stats)
|
|
REFERENCES stats (uuid) DEFERRABLE;
|
|
|
|
;
|
|
ALTER TABLE player_pjs ADD CONSTRAINT player_pjs_fk_owner FOREIGN KEY (owner)
|
|
REFERENCES players (uuid) ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE;
|
|
|
|
;
|
|
ALTER TABLE player_pjs ADD CONSTRAINT player_pjs_fk_training_stats FOREIGN KEY (training_stats)
|
|
REFERENCES stats (uuid) DEFERRABLE;
|
|
|
|
;
|
|
ALTER TABLE stats DROP COLUMN charisma;
|
|
|
|
;
|
|
ALTER TABLE teams ALTER COLUMN leader DROP NOT NULL;
|
|
|
|
;
|
|
|
|
COMMIT;
|
|
|