You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rake db:test:prepare fails loading schema (generated by MySql ) using sqlite3 engine because of specific options passed in schema (MySql specific)
#228
Open
Kareem-Emad opened this issue
Mar 7, 2019
· 1 comment
Caused by:
SQLite3::SQLException: near "ENGINE": syntax error
/home/kareem/Projects/platform/db/schema.rb:15:in block in <top (required)>' /home/kareem/Projects/platform/db/schema.rb:13:in <top (required)>'
bin/bundle:104:in load' bin/bundle:104:in
'
Tasks: TOP => db:test:load_schema
(See full trace by running task with --trace)
Makefile:36: recipe for target 'run-tests' failed
make: *** [run-tests] Error 1
I can get around this by removing options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" from the schema file before running make run-tests.
The text was updated successfully, but these errors were encountered:
sqlite3 --version
3.25.2
mysql --version
mysql Ver 14.14 Distrib 5.7.25
Error Log:
bin/bundle exec rake db:test:prepare
'rake aborted!
ActiveRecord::StatementInvalid: SQLite3::SQLException: near "ENGINE": syntax error: CREATE TABLE "app_dependencies" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "app_id" integer, "dependency_id" integer, "created_at" datetime, "updated_at" datetime) ENGINE=InnoDB DEFAULT CHARSET=utf8
/home/kareem/Projects/platform/db/schema.rb:15:in
block in <top (required)>' /home/kareem/Projects/platform/db/schema.rb:13:in
<top (required)>'bin/bundle:104:in
load' bin/bundle:104:in
Caused by:
'SQLite3::SQLException: near "ENGINE": syntax error
/home/kareem/Projects/platform/db/schema.rb:15:in
block in <top (required)>' /home/kareem/Projects/platform/db/schema.rb:13:in
<top (required)>'bin/bundle:104:in
load' bin/bundle:104:in
Tasks: TOP => db:test:load_schema
(See full trace by running task with --trace)
Makefile:36: recipe for target 'run-tests' failed
make: *** [run-tests] Error 1
I can get around this by removing
options: "ENGINE=InnoDB DEFAULT CHARSET=utf8"
from the schema file before running make run-tests.The text was updated successfully, but these errors were encountered: