Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails rails rake db:迁移sqllite3错误 StandardError:发生错误,此迁移和所有后续迁移已取消: SQLite3::SQLException:靠近“引擎”:语法错误:创建表“adv_bgs”(“id”INTEGER主键自动递增非空,“adv_bg_type”varchar,“adv_bg_id”INTEGER),上载文件名“varchar”,上载文件内容类型“varchar”,上载文件大小“INTEGER”,上载文件在“datetime”更新,“head”布尔默认值“f”,“imageable_id”integer,“imageable_type”varchar,“datetime NOT NULL”创建的_,“datetime NOT NULL”更新的_引擎=MyISAM默认字符集=utf8 /mnt/c/Users/direwolf/Documents/web/rails_projects/okar/db/migrate/20170425144835_init_schema.rb:4:in'up' /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:在“加载”中 /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in`' ActiveRecord::StatementInvalid:SQLite3::SQLException:near“ENGINE”:语法错误:创建表“adv_bgs”(“id”INTEGER主键自动递增不为NULL,“adv_bg_type”varchar,“adv_bg_id”INTEGER,“upload_file_file_name”varchar,“upload_file_content_type”varchar,“upload_file_file_size”INTEGER,“uplated_file_updated_at”datetime,“标题为“布尔默认值'f',“可成像\u id”整数,可成像\u类型为“varchar”,在“datetime NOT NULL”处创建,在“datetime NOT NULL”处更新,引擎=MyISAM DEFAULT CHARSET=utf8 /mnt/c/Users/direwolf/Documents/web/rails_projects/okar/db/migrate/20170425144835_init_schema.rb:4:in'up' /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:在“加载”中 /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in`' SQLite3::SQLException:靠近“引擎”:语法错误 /mnt/c/Users/direwolf/Documents/web/rails_projects/okar/db/migrate/20170425144835_init_schema.rb:4:in'up' /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:在“加载”中 /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in`' 任务:TOP=>db:migrate (通过使用--trace运行任务查看完整跟踪)_Ruby On Rails_Sqlite - Fatal编程技术网

Ruby on rails rails rake db:迁移sqllite3错误 StandardError:发生错误,此迁移和所有后续迁移已取消: SQLite3::SQLException:靠近“引擎”:语法错误:创建表“adv_bgs”(“id”INTEGER主键自动递增非空,“adv_bg_type”varchar,“adv_bg_id”INTEGER),上载文件名“varchar”,上载文件内容类型“varchar”,上载文件大小“INTEGER”,上载文件在“datetime”更新,“head”布尔默认值“f”,“imageable_id”integer,“imageable_type”varchar,“datetime NOT NULL”创建的_,“datetime NOT NULL”更新的_引擎=MyISAM默认字符集=utf8 /mnt/c/Users/direwolf/Documents/web/rails_projects/okar/db/migrate/20170425144835_init_schema.rb:4:in'up' /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:在“加载”中 /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in`' ActiveRecord::StatementInvalid:SQLite3::SQLException:near“ENGINE”:语法错误:创建表“adv_bgs”(“id”INTEGER主键自动递增不为NULL,“adv_bg_type”varchar,“adv_bg_id”INTEGER,“upload_file_file_name”varchar,“upload_file_content_type”varchar,“upload_file_file_size”INTEGER,“uplated_file_updated_at”datetime,“标题为“布尔默认值'f',“可成像\u id”整数,可成像\u类型为“varchar”,在“datetime NOT NULL”处创建,在“datetime NOT NULL”处更新,引擎=MyISAM DEFAULT CHARSET=utf8 /mnt/c/Users/direwolf/Documents/web/rails_projects/okar/db/migrate/20170425144835_init_schema.rb:4:in'up' /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:在“加载”中 /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in`' SQLite3::SQLException:靠近“引擎”:语法错误 /mnt/c/Users/direwolf/Documents/web/rails_projects/okar/db/migrate/20170425144835_init_schema.rb:4:in'up' /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:在“加载”中 /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in`' 任务:TOP=>db:migrate (通过使用--trace运行任务查看完整跟踪)

Ruby on rails rails rake db:迁移sqllite3错误 StandardError:发生错误,此迁移和所有后续迁移已取消: SQLite3::SQLException:靠近“引擎”:语法错误:创建表“adv_bgs”(“id”INTEGER主键自动递增非空,“adv_bg_type”varchar,“adv_bg_id”INTEGER),上载文件名“varchar”,上载文件内容类型“varchar”,上载文件大小“INTEGER”,上载文件在“datetime”更新,“head”布尔默认值“f”,“imageable_id”integer,“imageable_type”varchar,“datetime NOT NULL”创建的_,“datetime NOT NULL”更新的_引擎=MyISAM默认字符集=utf8 /mnt/c/Users/direwolf/Documents/web/rails_projects/okar/db/migrate/20170425144835_init_schema.rb:4:in'up' /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:在“加载”中 /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in`' ActiveRecord::StatementInvalid:SQLite3::SQLException:near“ENGINE”:语法错误:创建表“adv_bgs”(“id”INTEGER主键自动递增不为NULL,“adv_bg_type”varchar,“adv_bg_id”INTEGER,“upload_file_file_name”varchar,“upload_file_content_type”varchar,“upload_file_file_size”INTEGER,“uplated_file_updated_at”datetime,“标题为“布尔默认值'f',“可成像\u id”整数,可成像\u类型为“varchar”,在“datetime NOT NULL”处创建,在“datetime NOT NULL”处更新,引擎=MyISAM DEFAULT CHARSET=utf8 /mnt/c/Users/direwolf/Documents/web/rails_projects/okar/db/migrate/20170425144835_init_schema.rb:4:in'up' /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:在“加载”中 /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in`' SQLite3::SQLException:靠近“引擎”:语法错误 /mnt/c/Users/direwolf/Documents/web/rails_projects/okar/db/migrate/20170425144835_init_schema.rb:4:in'up' /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:在“加载”中 /home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in`' 任务:TOP=>db:migrate (通过使用--trace运行任务查看完整跟踪),ruby-on-rails,sqlite,Ruby On Rails,Sqlite,我该怎么办? 20170425144835_init_schema.rb StandardError: An error has occurred, this and all later migrations canceled: SQLite3::SQLException: near "ENGINE": syntax error: CREATE TABLE "adv_bgs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "adv_bg_t

我该怎么办? 20170425144835_init_schema.rb

StandardError: An error has occurred, this and all later migrations canceled:

SQLite3::SQLException: near "ENGINE": syntax error: CREATE TABLE "adv_bgs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "adv_bg_type" varchar, "adv_bg_id" integer, "uploaded_file_file_name" varchar, "uploaded_file_content_type" varchar, "uploaded_file_file_size" integer, "uploaded_file_updated_at" datetime, "head" boolean DEFAULT 'f', "imageable_id" integer, "imageable_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) ENGINE=MyISAM  DEFAULT CHARSET=utf8
/mnt/c/Users/direwolf/Documents/web/rails_projects/okar/db/migrate/20170425144835_init_schema.rb:4:in `up'
/home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
/home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'
ActiveRecord::StatementInvalid: SQLite3::SQLException: near "ENGINE": syntax error: CREATE TABLE "adv_bgs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "adv_bg_type" varchar, "adv_bg_id" integer, "uploaded_file_file_name" varchar, "uploaded_file_content_type" varchar, "uploaded_file_file_size" integer, "uploaded_file_updated_at" datetime, "head" boolean DEFAULT 'f', "imageable_id" integer, "imageable_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) ENGINE=MyISAM  DEFAULT CHARSET=utf8
/mnt/c/Users/direwolf/Documents/web/rails_projects/okar/db/migrate/20170425144835_init_schema.rb:4:in `up'
/home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
/home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'
SQLite3::SQLException: near "ENGINE": syntax error
/mnt/c/Users/direwolf/Documents/web/rails_projects/okar/db/migrate/20170425144835_init_schema.rb:4:in `up'
/home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
/home/jonsdirewolf/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
class InitSchemaclass InitSchema < ActiveRecord::Migration
  def up

    create_table "adv_bgs", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "adv_bg_type"
      t.integer  "adv_bg_id"
      t.string   "uploaded_file_file_name"
      t.string   "uploaded_file_content_type"
      t.integer  "uploaded_file_file_size"
      t.datetime "uploaded_file_updated_at"
      t.boolean  "head",                       default: false
      t.integer  "imageable_id"
      t.string   "imageable_type"
      t.datetime "created_at",                                 null: false
      t.datetime "updated_at",                                 null: false
      t.index ["adv_bg_type", "adv_bg_id"], name: "index_adv_bgs_on_adv_bg_type_and_adv_bg_id", using: :btree
      t.index ["head"], name: "index_adv_bgs_on_head", using: :btree
    end

    create_table "adv_logos", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "adv_logo_type"
      t.integer  "adv_logo_id"
      t.string   "uploaded_file_file_name"
      t.string   "uploaded_file_content_type"
      t.integer  "uploaded_file_file_size"
      t.datetime "uploaded_file_updated_at"
      t.boolean  "head",                       default: false
      t.integer  "imageable_id"
      t.string   "imageable_type"
      t.datetime "created_at",                                 null: false
      t.datetime "updated_at",                                 null: false
      t.index ["adv_logo_type", "adv_logo_id"], name: "index_adv_logos_on_adv_logo_type_and_adv_logo_id", using: :btree
      t.index ["head"], name: "index_adv_logos_on_head", using: :btree
    end

    create_table "adv_pic1s", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "adv_pic1_type"
      t.integer  "adv_pic1_id"
      t.string   "uploaded_file_file_name"
      t.string   "uploaded_file_content_type"
      t.integer  "uploaded_file_file_size"
      t.datetime "uploaded_file_updated_at"
      t.boolean  "head",                       default: false
      t.integer  "imageable_id"
      t.string   "imageable_type"
      t.datetime "created_at",                                 null: false
      t.datetime "updated_at",                                 null: false
      t.index ["adv_pic1_type", "adv_pic1_id"], name: "index_adv_pic1s_on_adv_pic1_type_and_adv_pic1_id", using: :btree
      t.index ["head"], name: "index_adv_pic1s_on_head", using: :btree
    end

    create_table "adv_pic2s", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "adv_pic2_type"
      t.integer  "adv_pic2_id"
      t.string   "uploaded_file_file_name"
      t.string   "uploaded_file_content_type"
      t.integer  "uploaded_file_file_size"
      t.datetime "uploaded_file_updated_at"
      t.boolean  "head",                       default: false
      t.integer  "imageable_id"
      t.string   "imageable_type"
      t.datetime "created_at",                                 null: false
      t.datetime "updated_at",                                 null: false
      t.index ["adv_pic2_type", "adv_pic2_id"], name: "index_adv_pic2s_on_adv_pic2_type_and_adv_pic2_id", using: :btree
      t.index ["head"], name: "index_adv_pic2s_on_head", using: :btree
    end

    create_table "adv_pic3s", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "adv_pic3_type"
      t.integer  "adv_pic3_id"
      t.string   "uploaded_file_file_name"
      t.string   "uploaded_file_content_type"
      t.integer  "uploaded_file_file_size"
      t.datetime "uploaded_file_updated_at"
      t.boolean  "head",                       default: false
      t.integer  "imageable_id"
      t.string   "imageable_type"
      t.datetime "created_at",                                 null: false
      t.datetime "updated_at",                                 null: false
      t.index ["adv_pic3_type", "adv_pic3_id"], name: "index_adv_pic3s_on_adv_pic3_type_and_adv_pic3_id", using: :btree
      t.index ["head"], name: "index_adv_pic3s_on_head", using: :btree
    end

    create_table "adv_pic4s", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "adv_pic4_type"
      t.integer  "adv_pic4_id"
      t.string   "uploaded_file_file_name"
      t.string   "uploaded_file_content_type"
      t.integer  "uploaded_file_file_size"
      t.datetime "uploaded_file_updated_at"
      t.boolean  "head",                       default: false
      t.integer  "imageable_id"
      t.string   "imageable_type"
      t.datetime "created_at",                                 null: false
      t.datetime "updated_at",                                 null: false
      t.index ["adv_pic4_type", "adv_pic4_id"], name: "index_adv_pic4s_on_adv_pic4_type_and_adv_pic4_id", using: :btree
      t.index ["head"], name: "index_adv_pic4s_on_head", using: :btree
    end

    create_table "adv_pic5s", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "adv_pic5_type"
      t.integer  "adv_pic5_id"
      t.string   "uploaded_file_file_name"
      t.string   "uploaded_file_content_type"
      t.integer  "uploaded_file_file_size"
      t.datetime "uploaded_file_updated_at"
      t.boolean  "head",                       default: false
      t.integer  "imageable_id"
      t.string   "imageable_type"
      t.datetime "created_at",                                 null: false
      t.datetime "updated_at",                                 null: false
      t.index ["adv_pic5_type", "adv_pic5_id"], name: "index_adv_pic5s_on_adv_pic5_type_and_adv_pic5_id", using: :btree
      t.index ["head"], name: "index_adv_pic5s_on_head", using: :btree
    end

    create_table "adv_pic6s", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "adv_pic6_type"
      t.integer  "adv_pic6_id"
      t.string   "uploaded_file_file_name"
      t.string   "uploaded_file_content_type"
      t.integer  "uploaded_file_file_size"
      t.datetime "uploaded_file_updated_at"
      t.boolean  "head",                       default: false
      t.integer  "imageable_id"
      t.string   "imageable_type"
      t.datetime "created_at",                                 null: false
      t.datetime "updated_at",                                 null: false
      t.index ["adv_pic6_type", "adv_pic6_id"], name: "index_adv_pic6s_on_adv_pic6_type_and_adv_pic6_id", using: :btree
      t.index ["head"], name: "index_adv_pic6s_on_head", using: :btree
    end

    create_table "adv_pic7s", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "adv_pic7_type"
      t.integer  "adv_pic7_id"
      t.string   "uploaded_file_file_name"
      t.string   "uploaded_file_content_type"
      t.integer  "uploaded_file_file_size"
      t.datetime "uploaded_file_updated_at"
      t.boolean  "head",                       default: false
      t.integer  "imageable_id"
      t.string   "imageable_type"
      t.datetime "created_at",                                 null: false
      t.datetime "updated_at",                                 null: false
      t.index ["adv_pic7_type", "adv_pic7_id"], name: "index_adv_pic7s_on_adv_pic7_type_and_adv_pic7_id", using: :btree
      t.index ["head"], name: "index_adv_pic7s_on_head", using: :btree
    end

    create_table "advertising_applications", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.integer  "user_id"
      t.integer  "anon_user_id"
      t.integer  "televisor_id",                 limit: 1,                                     null: false
      t.integer  "advertising_public_status_id", limit: 1,     default: 1
      t.integer  "advertising_period_id",        limit: 1,     default: 1
      t.integer  "payment_status_id",            limit: 1,     default: 1
      t.integer  "step",                         limit: 1,     default: 1
      t.integer  "spec_id",                      limit: 1,     default: 1
      t.string   "email"
      t.string   "lnk"
      t.string   "redwords"
      t.string   "zkname"
      t.string   "zkdescr"
      t.integer  "price"
      t.integer  "charge",                       limit: 1,     default: 1
      t.datetime "endtime",                                    default: '2017-04-25 17:47:04'
      t.text     "comment",                      limit: 65535
      t.datetime "created_at",                                                                 null: false
      t.datetime "updated_at",                                                                 null: false
      t.index ["advertising_period_id"], name: "index_advertising_applications_on_advertising_period_id", using: :btree
      t.index ["advertising_public_status_id"], name: "index_advertising_applications_on_advertising_public_status_id", using: :btree
      t.index ["anon_user_id"], name: "index_advertising_applications_on_anon_user_id", using: :btree
      t.index ["payment_status_id"], name: "index_advertising_applications_on_payment_status_id", using: :btree
      t.index ["televisor_id"], name: "index_advertising_applications_on_televisor_id", using: :btree
      t.index ["user_id"], name: "index_advertising_applications_on_user_id", using: :btree
    end

    create_table "advertising_periods", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "value"
      t.datetime "created_at", null: false
      t.datetime "updated_at", null: false
    end

    create_table "advertising_public_statuses", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "value"
      t.datetime "created_at", null: false
      t.datetime "updated_at", null: false
    end

    create_table "anon_saved_searches", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "subtype",            limit: 3,     null: false
      t.string   "link_to",            limit: 64,    null: false
      t.string   "name",               limit: 32
      t.string   "category"
      t.string   "square_from",        limit: 24
      t.string   "square_to",          limit: 24
      t.string   "price_from",         limit: 24
      t.string   "price_to",           limit: 24
      t.string   "price_src",          limit: 3
      t.text     "data",               limit: 65535
      t.datetime "created_at",                       null: false
      t.datetime "updated_at",                       null: false
      t.text     "metro_data",         limit: 65535, null: false
      t.integer  "add_params_count",   limit: 1,                  unsigned: true
      t.integer  "main_city",          limit: 1,                  unsigned: true
      t.text     "location_tags_data", limit: 65535, null: false
    end

    create_table "anon_users", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "email"
      t.string   "access_level", limit: 16, default: "anon", null: false
      t.string   "access_code",  limit: 32,                  null: false
      t.datetime "created_at",                               null: false
      t.datetime "updated_at",                               null: false
      t.index ["email"], name: "index_anon_users_on_email", using: :btree
    end

    create_table "area_types", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "value"
      t.datetime "created_at", null: false
      t.datetime "updated_at", null: false
    end

    create_table "avatars", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "imageable_type"
      t.integer  "imageable_id"
      t.string   "uploaded_file_file_name"
      t.string   "uploaded_file_content_type"
      t.integer  "uploaded_file_file_size"
      t.datetime "uploaded_file_updated_at"
      t.datetime "created_at",                 null: false
      t.datetime "updated_at",                 null: false
      t.index ["imageable_type", "imageable_id"], name: "index_avatars_on_imageable_type_and_imageable_id", using: :btree
    end

    create_table "bad_room_kinds", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "value"
      t.datetime "created_at", null: false
      t.datetime "updated_at", null: false
    end

    create_table "bad_room_nums", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "value"
      t.datetime "created_at", null: false
      t.datetime "updated_at", null: false
    end

    create_table "bad_room_presents", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "value"
      t.datetime "created_at", null: false
      t.datetime "updated_at", null: false
    end

    create_table "balcons", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "value"
      t.datetime "created_at", null: false
      t.datetime "updated_at", null: false
    end

    create_table "bg_cn_names", force: :cascade, options: "ENGINE=MyISAM  DEFAULT CHARSET=utf8" do |t|
      t.string   "value"
      t.datetime "created_at", null: false
      t.datetime "updated_at", null: false
      t.index ["value"], name: "ivalue", type: :fulltext
    end