I am transferring from mySQL to postgreSQL and wondering how can I add index inside the table of postgreSQL
CREATE TABLE IF NOT EXISTS game_history
(
id SERIAL,
PRIMARY KEY(id),
INDEX fk_game_history_user_idx (game_id ASC) ,
CONSTRAINT fk_game_history_user
FOREIGN KEY (game_id )
REFERENCES mydb.game (id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
)
FROM
INDEX fk_game_history_user_idx (game_id ASC) ,
CONSTRAINT fk_game_history_user
FOREIGN KEY (game_id )
REFERENCES mydb.game (id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
)
I am not sure on this.