TheMathemagicians/sevenkeys/database/migrations/00005_add_cardscan_table.sql

15 lines
363 B
SQL

-- +goose Up
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS CardScan (
Id INT PRIMARY KEY AUTO_INCREMENT,
ProductLocationId INT NOT NULL,
FOREIGN KEY (ProductLocationId) REFERENCES ProductLocation(Id),
Filename VARCHAR(100) NOT NULL
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS CardScan;
-- +goose StatementEnd