sudo service mysql start - start mysql
remove all entries in database:
- rake db:drop:all
- rake db:create:all
- rake db:migrate
- mysql -u root -p
- use sad_gnex_commercial_development;
- mysql statements: show create table products; *** ALTER TABLE products DROP FOREIGN KEY <CONSTRAINT NAME FROM *** >; ALTER TABLE products DROP KEY <KEY NAME FROM *** >; ALTER TABLE suppliers CHANGE id supplier_id integer(3) auto_increment; ALTER TABLE products MODIFY supplier_id integer(3) NOT NULL; ALTER TABLE products ADD FOREIGN KEY (supplier_id) REFERENCES suppliers(supplier_id);