Migration to the gem high_voltage: « Easily include static pages in your Rails app»

This replaces the "application" directory where were stored some common static pages
rails5
echarp 6 years ago
parent ded6147ba5
commit 2fae5c09a4
  1. 2
      Gemfile
  2. 8
      Gemfile.lock
  3. 4
      app/assets/javascripts/filter.js.coffee
  4. 18
      app/assets/stylesheets/application.sass
  5. 2
      app/assets/stylesheets/events.sass
  6. 2
      app/assets/stylesheets/form.sass
  7. 2
      app/views/events/index.html.haml
  8. 4
      app/views/layouts/application.html.haml
  9. 0
      app/views/pages/contact.haml
  10. 0
      app/views/pages/filter.haml
  11. 0
      app/views/pages/infos.haml
  12. 0
      app/views/pages/rules.haml
  13. 4
      config/locales/views/en.yml
  14. 4
      config/locales/views/fr.yml
  15. 4
      config/locales/views/pt-BR.yml
  16. 4
      config/routes.rb
  17. 19
      db/migrate/20161031215120_migrate_i18n_to_high_voltage.rb
  18. 12
      db/seeds.rb
  19. 280
      db/structure.sql

@ -4,6 +4,8 @@ source 'https://rubygems.org'
gem 'simple_calendar'
# The recurrence management library
gem 'ice_cube'
# Rails engine for static pages
gem 'high_voltage'
gem 'rails'
# Later versions require a new ruby version, which is not yet in production

@ -108,7 +108,7 @@ GEM
railties (>= 4.1.0, < 5.1)
responders
warden (~> 1.2.3)
devise-i18n (1.1.0)
devise-i18n (1.1.1)
differ (0.1.2)
docile (1.1.5)
domain_name (0.5.20161021)
@ -174,7 +174,7 @@ GEM
haml (>= 4.0.6, < 5.0)
html2haml (>= 1.0.1)
railties (>= 4.0.1)
haml_lint (0.18.3)
haml_lint (0.18.4)
haml (~> 4.0)
rake (>= 10, < 12)
rubocop (>= 0.36.0)
@ -182,6 +182,7 @@ GEM
has_scope (0.6.0)
actionpack (>= 3.2, < 5)
activesupport (>= 3.2, < 5)
high_voltage (3.0.0)
html2haml (2.0.0)
erubis (~> 2.7.0)
haml (~> 4.0.0)
@ -315,7 +316,7 @@ GEM
request_store (1.3.1)
responders (2.3.0)
railties (>= 4.2.0, < 5.1)
rubocop (0.44.1)
rubocop (0.45.0)
parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
@ -428,6 +429,7 @@ DEPENDENCIES
haml-rails
haml_lint
has_scope (< 0.7)
high_voltage
http_accept_language
i18n-active_record!
ice_cube

@ -1,8 +1,8 @@
# Cleans up filter submission, for cleaner URL
$(document).on 'turbolinks:load', ->
$('body.filter form :input').prop 'disabled', false
$('body.pages form :input').prop 'disabled', false
$('body.filter form').submit ->
$('body.pages form').submit ->
$('input[name=utf8]').prop 'disabled', true
$(':input', this).filter ->
this.value.length == 0

@ -17,19 +17,5 @@
@import font-awesome-sprockets
@import font-awesome
body.application
&.infos h4
text-align: left
&.infos, &.contact, &.rules
main h2:first-child:before
+fa-icon()
margin-right: 0.4em
&.infos main h2:first-child:before
content: $fa-var-info
&.contact main h2:first-child:before
content: $fa-var-envelope
&.rules main h2:first-child:before
content: $fa-var-gavel
body.pages main h4
text-align: left

@ -107,7 +107,7 @@ a#banner
margin-left: 5%
padding-left: 2px
body.events.show, body.orgas.show, body.tags.show, body.filter
body.events.show, body.orgas.show, body.tags.show, body.pages
main
padding: 1em
max-width: 60em

@ -1,7 +1,7 @@
@import font-awesome-sprockets
@import font-awesome
.events form, .moderations form, .orgas, .digests form, .filter form
.events form, .moderations form, .orgas, .digests form, .pages form
.field, .actions
max-width: 70em
text-align: left

@ -50,7 +50,7 @@
\-
= link_to application_filter_path do
= link_to page_path('filter') do
%em.fa.fa-filter
= t '.filter'

@ -62,13 +62,13 @@
= link_to versions_path do
%em.fa.fa-exchange
= t 'versions.index.title'
= link_to application_infos_path do
= link_to page_path('infos') do
%em.fa.fa-info
= t '.infos'
= link_to stats_path do
%em.fa.fa-signal
= t '.stats'
= link_to application_contact_path do
= link_to page_path('contact') do
%em.fa.fa-envelope
= t '.contact'
= link_to moderations_path do

@ -162,7 +162,7 @@ it more readable or agreable.
index:
title: Events to moderate
rules: Moderators, thanks for reading and taking notice of [moderation
recommandations](/application/rules).
recommandations](/pages/rules).
actions: Actions
posted_by: Created by %{author} on %{date}
date: Date
@ -419,7 +419,7 @@ reason:
destroy_html: <em class='fa fa-trash'></em>
feed: RSS feed
application:
pages:
filter:
title: Advanced filtering
helper: Choose one or more filters to display events or integrate them in

@ -159,7 +159,7 @@ fr:
index:
title: Événements à modérer
rules: Modérateurs, merci de lire et de tenir compte des [recommandations
de modération](/application/rules).
de modération](/pages/rules).
actions: Actions
posted_by: Posté par %{author} le %{date}
date: Date
@ -423,7 +423,7 @@ l'adresse:"
destroy_html: <em class='fa fa-trash'></em>
feed: Flux RSS
application:
pages:
filter:
title: Filtrage avancé
helper: Choisissez un ou plusieurs filtres pour afficher les événements

@ -163,7 +163,7 @@ completa, deixando o texto mais legível e agradável.
index:
title: Eventos para moderar
rules: Moderadores, obrigado por ler e tomar conhecimento das [recomendações
de moderação](/application/rules).
de moderação](/pages/rules).
actions: Ações
posted_by: Criado por %{author} em %{date}
date: Data
@ -455,7 +455,7 @@ do evento no seguinte endereço:"
destroy_html: <em class='fa fa-trash'></em>
feed: feed RSS
application:
pages:
filter:
title: Busca Avançada
helper: Os parâmetros podem ser usados na agenda para consulta, ou integração em outro site

@ -1,8 +1,4 @@
Rails.application.routes.draw do
get 'application/infos'
get 'application/contact'
get 'application/rules'
get 'application/filter'
get 'stats', to: 'stats#index'
get 'versions', to: 'versions#index'

@ -0,0 +1,19 @@
# Migrate some i18n translations in the database to the high_voltage static
# page CMS
class MigrateI18nToHighVoltage < ActiveRecord::Migration
def up
update "
update translations
set `key` = replace(`key`, 'application', 'pages')
where `key` like 'application.%'
"
end
def down
update "
update translations
set `key` = replace(`key`, 'pages', 'application')
where `key` like 'pages.%'
"
end
end

@ -76,8 +76,8 @@ Si vous soumettez souvent un événement régulier dans l'Agenda du Libre, vous
*Dans les tags, indiquez le nom de la ou des associations organisatrices. N'indiquez pas le nom de la ville ou de la région.*" },
{ locale: 'fr', key: 'application.infos.content',
value: "## Informations
{ locale: 'fr', key: 'pages.infos.content',
value: "## <em class='fa fa-info'></em> Informations
### Table des matières
@ -361,16 +361,16 @@ Bien que le logiciel faisant fonctionner l'Agenda du Libre soit spécifique, d'a
#### 05/06/2005
* Lancement du site" },
{ locale: 'fr', key: 'application.contact.content',
value: "## Contact
{ locale: 'fr', key: 'pages.contact.content',
value: "## <em class='fa fa-envelope'></em> Contact
Pour contacter les modérateurs du site *Agenda du Libre*:
* Par courrier électronique, à l'adresse moderateurs@agendadulibre.org
* Par [IRC](http://fr.wikipedia.org/wiki/IRC), sur le canal `#agendadulibre` du réseau *Freenode*" },
{ locale: 'fr', key: 'application.rules.content',
value: "## Recommandations sur la modération
{ locale: 'fr', key: 'pages.rules.content',
value: "## <em class='fa fa-gavel'></em> Recommandations sur la modération
Tous les événements de l'Agenda du Libre passent par une phase de modération, qui permet de s'assurer que les événements recensés rentrent bien dans la [ligne éditoriale](#ligne) et que la [qualité de la description des événements](#qualite) reste bonne.

@ -1,215 +1,71 @@
-- MySQL dump 10.13 Distrib 5.5.33, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: adl_fr
-- ------------------------------------------------------
-- Server version 5.5.33-1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `active_admin_comments`
--
DROP TABLE IF EXISTS `active_admin_comments`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `active_admin_comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`namespace` varchar(255) DEFAULT NULL,
`body` text,
`resource_id` varchar(255) NOT NULL,
`resource_type` varchar(255) NOT NULL,
`author_id` int(11) DEFAULT NULL,
`author_type` varchar(255) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `index_active_admin_comments_on_namespace` (`namespace`),
KEY `index_active_admin_comments_on_author_type_and_author_id` (`author_type`,`author_id`),
KEY `index_active_admin_comments_on_resource_type_and_resource_id` (`resource_type`,`resource_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `admin_users`
--
DROP TABLE IF EXISTS `admin_users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `admin_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL DEFAULT '',
`encrypted_password` varchar(255) NOT NULL DEFAULT '',
`reset_password_token` varchar(255) DEFAULT NULL,
`reset_password_sent_at` datetime DEFAULT NULL,
`remember_created_at` datetime DEFAULT NULL,
`sign_in_count` int(11) NOT NULL DEFAULT '0',
`current_sign_in_at` datetime DEFAULT NULL,
`last_sign_in_at` datetime DEFAULT NULL,
`current_sign_in_ip` varchar(255) DEFAULT NULL,
`last_sign_in_ip` varchar(255) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_admin_users_on_email` (`email`),
UNIQUE KEY `index_admin_users_on_reset_password_token` (`reset_password_token`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `cities`
--
DROP TABLE IF EXISTS `cities`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cities` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`majname` varchar(255) NOT NULL DEFAULT '',
`postalcode` int(11) DEFAULT NULL,
`inseecode` int(11) DEFAULT NULL,
`regioncode` int(11) DEFAULT NULL,
`latitude` float DEFAULT NULL,
`longitude` float DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `cities_name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=51637 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `events`
--
DROP TABLE IF EXISTS `events`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `events` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '',
`description` text NOT NULL,
`start_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`city` varchar(255) NOT NULL DEFAULT '',
`region` int(11) NOT NULL DEFAULT '0',
`locality` int(11) NOT NULL DEFAULT '0',
`url` varchar(255) NOT NULL DEFAULT '',
`contact` varchar(255) NOT NULL DEFAULT '',
`submitter` varchar(255) NOT NULL DEFAULT '',
`moderated` int(11) NOT NULL DEFAULT '0',
`tags` varchar(255) NOT NULL DEFAULT '',
`secret` varchar(255) NOT NULL DEFAULT '',
`decision_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`submission_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`moderator_mail_id` varchar(32) DEFAULT NULL,
`submitter_mail_id` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `events_date` (`start_time`,`end_time`)
) ENGINE=MyISAM AUTO_INCREMENT=8113 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `lugs`
--
DROP TABLE IF EXISTS `lugs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `lugs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`region` int(11) NOT NULL DEFAULT '0',
`department` int(11),
`name` varchar(255) NOT NULL DEFAULT '',
`url` varchar(255) NOT NULL DEFAULT '',
`city` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3444 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `notes`
--
DROP TABLE IF EXISTS `notes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `notes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`contents` text NOT NULL,
`date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`event_id` int(11) DEFAULT NULL,
`author_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=662 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `regions`
--
DROP TABLE IF EXISTS `regions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `regions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `schema_migrations`
--
DROP TABLE IF EXISTS `schema_migrations`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `schema_migrations` (
`version` varchar(255) NOT NULL,
UNIQUE KEY `unique_schema_migrations` (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`login` varchar(255) NOT NULL DEFAULT '',
`password` varchar(255) NOT NULL DEFAULT '',
`email` varchar(255) NOT NULL DEFAULT '',
`lastname` varchar(255) NOT NULL DEFAULT '',
`firstname` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2013-11-24 15:40:00
INSERT INTO schema_migrations (version) VALUES ('0');
CREATE TABLE "schema_migrations" ("version" varchar NOT NULL);
CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version");
CREATE TABLE "active_admin_comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "namespace" varchar(255), "body" text(65535), "resource_id" varchar(255) NOT NULL, "resource_type" varchar(255) NOT NULL, "author_id" integer(4), "author_type" varchar(255), "created_at" datetime, "updated_at" datetime);
CREATE INDEX "index_active_admin_comments_on_author_type_and_author_id" ON "active_admin_comments" ("author_type", "author_id");
CREATE INDEX "index_active_admin_comments_on_namespace" ON "active_admin_comments" ("namespace");
CREATE INDEX "index_active_admin_comments_on_resource_type_and_resource_id" ON "active_admin_comments" ("resource_type", "resource_id");
CREATE TABLE "admin_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255) DEFAULT '' NOT NULL, "reset_password_token" varchar(255), "reset_password_sent_at" datetime, "remember_created_at" datetime, "sign_in_count" integer(4) DEFAULT 0 NOT NULL, "current_sign_in_at" datetime, "last_sign_in_at" datetime, "current_sign_in_ip" varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime, "updated_at" datetime);
CREATE UNIQUE INDEX "index_admin_users_on_email" ON "admin_users" ("email");
CREATE UNIQUE INDEX "index_admin_users_on_reset_password_token" ON "admin_users" ("reset_password_token");
CREATE TABLE "cities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "majname" varchar(255) DEFAULT '' NOT NULL, "postalcode" integer(4), "inseecode" integer(4), "regioncode" integer(4), "latitude" float(24), "longitude" float(24));
CREATE INDEX "cities_name" ON "cities" ("name");
CREATE TABLE "events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255) DEFAULT '' NOT NULL, "description" text(65535) NOT NULL, "start_time" datetime NOT NULL, "end_time" datetime NOT NULL, "city" varchar(255) DEFAULT '', "region_id" integer(4) DEFAULT 0 NOT NULL, "locality" integer(4) DEFAULT 0 NOT NULL, "url" varchar(255) DEFAULT '' NOT NULL, "contact" varchar(255) DEFAULT '' NOT NULL, "submitter" varchar(255) DEFAULT '' NOT NULL, "moderated" integer(4) DEFAULT 0 NOT NULL, "tags" varchar(255) DEFAULT '' NOT NULL, "secret" varchar(255) DEFAULT '' NOT NULL, "decision_time" datetime, "submission_time" datetime, "moderator_mail_id" varchar(32), "submitter_mail_id" varchar(32), "address" text(65535), "latitude" float(24), "longitude" float(24), "lock_version" integer(4) DEFAULT 0 NOT NULL, "place_name" varchar(255), "count" integer DEFAULT 1, "repeat" integer DEFAULT 0, "rule" text, "event_id" integer);
CREATE INDEX "index_events_on_event_id" ON "events" ("event_id");
CREATE INDEX "events_date" ON "events" ("start_time", "end_time");
CREATE TABLE "kinds" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "icon" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL);
CREATE TABLE "notes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contents" text(65535) NOT NULL, "date" datetime NOT NULL, "event_id" integer(4), "author_id" integer(4));
CREATE TABLE "orgas" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "region_id" integer(4) DEFAULT 0 NOT NULL, "department" varchar(4) DEFAULT '0' NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL, "url" varchar(255) DEFAULT '' NOT NULL, "city" varchar(255) DEFAULT '', "kind_id" integer(4), "feed" varchar(255), "contact" varchar(255), "submitter" varchar(255), "moderated" boolean(1) DEFAULT 'f', "submission_time" datetime, "decision_time" datetime, "secret" varchar(255), "deleted" boolean(1) DEFAULT 'f' NOT NULL, "active" boolean DEFAULT 't' NOT NULL, "description" text, "created_at" datetime, "updated_at" datetime, "tag" text, "tags" text DEFAULT '', "diaspora" text, "object_changes" text, "place_name" text, "address" text, "latitude" float, "longitude" float);
CREATE INDEX "index_orgas_on_kind_id" ON "orgas" ("kind_id");
CREATE TABLE "regions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) DEFAULT '' NOT NULL);
CREATE TABLE "taggings" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "tag_id" integer, "taggable_id" integer, "taggable_type" varchar(255), "tagger_id" integer, "tagger_type" varchar(255), "context" varchar(128), "created_at" datetime);
CREATE UNIQUE INDEX "taggings_idx" ON "taggings" ("tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type");
CREATE INDEX "index_taggings_on_taggable_id_and_taggable_type_and_context" ON "taggings" ("taggable_id", "taggable_type", "context");
CREATE TABLE "tags" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "taggings_count" integer DEFAULT 0);
CREATE UNIQUE INDEX "index_tags_on_name" ON "tags" ("name");
CREATE TABLE "translations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "locale" varchar(255), "key" varchar(255), "value" text(65535), "interpolations" text(65535), "is_proc" boolean(1) DEFAULT 'f');
CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(255) DEFAULT '' NOT NULL, "password" varchar(255) DEFAULT '' NOT NULL, "email" varchar(255) DEFAULT '' NOT NULL, "lastname" varchar(255) DEFAULT '' NOT NULL, "firstname" varchar(255) DEFAULT '' NOT NULL, "confirmation_token" varchar, "confirmed_at" datetime, "confirmation_sent_at" datetime, "remember_created_at" datetime);
CREATE UNIQUE INDEX "index_users_on_confirmation_token" ON "users" ("confirmation_token");
CREATE TABLE "versions" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "event" varchar NOT NULL, "whodunnit" varchar, "object" text, "created_at" datetime, "object_changes" text(1073741823));
CREATE INDEX "index_versions_on_item_type_and_item_id" ON "versions" ("item_type", "item_id");
INSERT INTO schema_migrations (version) VALUES ('20131114103118');
INSERT INTO schema_migrations (version) VALUES ('20131114103121');
INSERT INTO schema_migrations (version) VALUES ('20140403204748');
INSERT INTO schema_migrations (version) VALUES ('20140823111115');
INSERT INTO schema_migrations (version) VALUES ('20141011100700');
INSERT INTO schema_migrations (version) VALUES ('20150215121248');
INSERT INTO schema_migrations (version) VALUES ('20150215151059');
INSERT INTO schema_migrations (version) VALUES ('20150215172000');
INSERT INTO schema_migrations (version) VALUES ('20150215172739');
INSERT INTO schema_migrations (version) VALUES ('20150301223829');
INSERT INTO schema_migrations (version) VALUES ('20150711164423');
INSERT INTO schema_migrations (version) VALUES ('20151225194836');
INSERT INTO schema_migrations (version) VALUES ('20151226223947');
INSERT INTO schema_migrations (version) VALUES ('20160102152958');
INSERT INTO schema_migrations (version) VALUES ('20160103141244');
INSERT INTO schema_migrations (version) VALUES ('20160107203117');
INSERT INTO schema_migrations (version) VALUES ('20160109203136');
INSERT INTO schema_migrations (version) VALUES ('20160111124855');
INSERT INTO schema_migrations (version) VALUES ('20160409131029');
INSERT INTO schema_migrations (version) VALUES ('20160616190823');
INSERT INTO schema_migrations (version) VALUES ('20161031215120');

Loading…
Cancel
Save