DROP TABLE IF EXISTS ast_train_t;
CREATE TABLE ast_train_t
(
    id    INT PRIMARY KEY AUTO_INCREMENT,
    label VARCHAR(36) NOT NULL
);


INSERT INTO ast_train_t (id, label) VALUES (0, 'Undefined');
INSERT INTO ast_train_t (id, label) VALUES (1, 'ED80 ASI1600MM-Pro');
INSERT INTO ast_train_t (id, label) VALUES (2, 'ED80 ASI1600MM-Pro');

ALTER TABLE ast_sub_t
    ADD COLUMN (train_id INT NOT NULL DEFAULT 0,
                FOREIGN KEY (train_id) REFERENCES ast_train_t (id));
