Hello G.s!
I’m in need of your help!
I’m going through this page ->
http://guides.rubyonrails.org/migrations.html
See the code of the example migration at 3.5 - Using the up/down
Methods
So I coded everything like this in to my db/migrate folder. Gave it a
version number and all that stuff.
Now when I run “rake db:migrate” it gives me the following error:
rake aborted!
An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: near “CONSTRAINT”: syntax error:
ALTER TABLE products
ADD CONSTRAINT fk_products_categories
FOREIGN KEY (category_id)
REFERENCES categories(id)
Can someone help me with this?