From 5798fd001cb17528eb5a694e220f8b1276376b4c Mon Sep 17 00:00:00 2001 From: echarp Date: Fri, 18 Jul 2014 19:04:57 +0200 Subject: [PATCH] =?UTF-8?q?Facilit=C3=A9s=20pour=20mettre=20en=20place=20u?= =?UTF-8?q?ne=20version=20sqlite=20de=20l'adl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 2 +- Gemfile.lock | 4 +++- config/database.yml | 11 +---------- db/schema.rb | 14 +++++++------- db/seeds.rb | 2 ++ 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/Gemfile b/Gemfile index 18bf2dd8..35847d2d 100644 --- a/Gemfile +++ b/Gemfile @@ -89,7 +89,7 @@ gem 'tinymce-rails-langs' gem 'meta-tags' group :development do - gem 'sqlite' + gem 'sqlite3' gem 'guard-livereload' gem 'guard-bundler' gem 'guard-minitest' diff --git a/Gemfile.lock b/Gemfile.lock index 34e09b2d..e07c1d58 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -252,7 +252,7 @@ GEM slim (2.0.3) temple (~> 0.6.6) tilt (>= 1.3.3, < 2.1) - slop (3.5.0) + slop (3.6.0) spring (1.1.3) sprockets (2.11.0) hike (~> 1.2) @@ -263,6 +263,7 @@ GEM actionpack (>= 3.0) activesupport (>= 3.0) sprockets (~> 2.8) + sqlite3 (1.3.9) temple (0.6.8) terminal-table (1.4.5) therubyracer (0.12.1) @@ -328,6 +329,7 @@ DEPENDENCIES sdoc (~> 0.4.0) simple_calendar spring + sqlite3 therubyracer tinymce-rails tinymce-rails-langs diff --git a/config/database.yml b/config/database.yml index ba055928..adfd53e8 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,17 +1,8 @@ -# MySQL. Versions 4.1 and 5.0 are recommended. -# -# Install the MYSQL driver -# gem install mysql2 -# -# Ensure the MySQL gem is defined in your Gemfile -# gem 'mysql2' -# -# And be sure to use new-style password hashing: -# http://dev.mysql.com/doc/refman/5.0/en/old-client.html development: adapter: sqlite3 pool: 5 timeout: 5000 + database: db/development.sqlite3 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". diff --git a/db/schema.rb b/db/schema.rb index 43e6a59e..ccfd9968 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -24,9 +24,9 @@ ActiveRecord::Schema.define(version: 20140403204748) do t.datetime "updated_at" end - add_index "active_admin_comments", ["author_type", "author_id"], name: "index_active_admin_comments_on_author_type_and_author_id", using: :btree - add_index "active_admin_comments", ["namespace"], name: "index_active_admin_comments_on_namespace", using: :btree - add_index "active_admin_comments", ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource_type_and_resource_id", using: :btree + add_index "active_admin_comments", ["author_type", "author_id"], name: "index_active_admin_comments_on_author_type_and_author_id" + add_index "active_admin_comments", ["namespace"], name: "index_active_admin_comments_on_namespace" + add_index "active_admin_comments", ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource_type_and_resource_id" create_table "admin_users", force: true do |t| t.string "email", default: "", null: false @@ -43,8 +43,8 @@ ActiveRecord::Schema.define(version: 20140403204748) do t.datetime "updated_at" end - add_index "admin_users", ["email"], name: "index_admin_users_on_email", unique: true, using: :btree - add_index "admin_users", ["reset_password_token"], name: "index_admin_users_on_reset_password_token", unique: true, using: :btree + add_index "admin_users", ["email"], name: "index_admin_users_on_email", unique: true + add_index "admin_users", ["reset_password_token"], name: "index_admin_users_on_reset_password_token", unique: true create_table "cities", force: true do |t| t.string "name", default: "", null: false @@ -56,7 +56,7 @@ ActiveRecord::Schema.define(version: 20140403204748) do t.float "longitude", limit: 24 end - add_index "cities", ["name"], name: "cities_name", using: :btree + add_index "cities", ["name"], name: "cities_name" create_table "events", force: true do |t| t.string "title", default: "", null: false @@ -78,7 +78,7 @@ ActiveRecord::Schema.define(version: 20140403204748) do t.string "submitter_mail_id", limit: 32 end - add_index "events", ["start_time", "end_time"], name: "events_date", using: :btree + add_index "events", ["start_time", "end_time"], name: "events_date" create_table "lugs", force: true do |t| t.integer "region", default: 0, null: false diff --git a/db/seeds.rb b/db/seeds.rb index 0b978c14..f1e68810 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -8,6 +8,8 @@ # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # Mayor.create(name: 'Emanuel', city: cities.first) +Region.create name: 'Ma première région' + I18n::Backend::ActiveRecord::Translation.create([ { locale: 'fr', key: 'layouts.application.subtitle', value: 'L\'agenda des évènements du Logiciel Libre en France' },