ITコンサルの日常

ITコンサル会社に勤務する普通のITエンジニアの日常です。

sqlite3にはforeign keyないらしい。

sqlite3コマンドラインで、やっても同じだった。

sqlite> alter table line_items add constraint fk_line_item_products foreign key
(product_id) references products(id)
   ...> ;
SQL error: near "constraint": syntax error
sqlite>

ので、foreign keyなしで行くことにする。