
CREATE TABLE year2grp2subj_new (
	year2grp2subj_id INTEGER PRIMARY KEY AUTO_INCREMENT,
	year_id INTEGER NOT NULL,
	grp2subj_id INTEGER NOT NULL,
	UNIQUE ( year_id, grp2subj_id )
);
CREATE INDEX year2grp2subj0_new ON year2grp2subj_new ( year_id );
CREATE INDEX year2grp2subj1_new ON year2grp2subj_new ( grp2subj_id );

INSERT INTO year2grp2subj_new ( year_id, grp2subj_id ) SELECT year_id, grp2subj_id FROM year2grp2subj
