Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git-scm.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJean-Noël Avila <jn.avila@free.fr>2019-02-26 01:14:54 +0300
committerJean-Noël Avila <jn.avila@free.fr>2019-07-05 19:05:05 +0300
commita442551c5c20712e4dfddd6ed31cba2a5373eab1 (patch)
tree0e83bf8199884c51b1af6a01d9998ed63d0f5f0b /db
parent2d9801951713d907940053df8d514816568f06d7 (diff)
Introduce language field
This commit is a no-op for the moment. Only a new field is used in the database.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190131210305_add_language_to_doc_version.rb6
-rw-r--r--db/schema.rb14
-rw-r--r--db/structure.sql4
3 files changed, 23 insertions, 1 deletions
diff --git a/db/migrate/20190131210305_add_language_to_doc_version.rb b/db/migrate/20190131210305_add_language_to_doc_version.rb
new file mode 100644
index 00000000..f4ad7bbf
--- /dev/null
+++ b/db/migrate/20190131210305_add_language_to_doc_version.rb
@@ -0,0 +1,6 @@
+# frozen_string_literal: true
+class AddLanguageToDocVersion < ActiveRecord::Migration
+ def change
+ add_column :doc_versions, :language, :string, default: "en"
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 98a82fd0..fe70e9d7 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20141027114732) do
+ActiveRecord::Schema.define(version: 20190131210305) do
create_table "books", force: :cascade do |t|
t.string "code"
@@ -56,6 +56,7 @@ ActiveRecord::Schema.define(version: 20141027114732) do
t.integer "doc_file_id"
t.datetime "created_at"
t.datetime "updated_at"
+ t.string "language", default: "en"
end
create_table "docs", force: :cascade do |t|
@@ -78,6 +79,17 @@ ActiveRecord::Schema.define(version: 20141027114732) do
t.datetime "release_date"
end
+ create_table "related_items", force: :cascade do |t|
+ t.string "name"
+ t.string "content_type"
+ t.string "content_url"
+ t.string "related_type"
+ t.string "related_id"
+ t.integer "score"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
create_table "sections", force: :cascade do |t|
t.string "title"
t.string "slug"
diff --git a/db/structure.sql b/db/structure.sql
new file mode 100644
index 00000000..f04b363b
--- /dev/null
+++ b/db/structure.sql
@@ -0,0 +1,4 @@
+CREATE TABLE IF NOT EXISTS "schema_migrations" ("version" varchar NOT NULL);
+CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version");
+INSERT INTO schema_migrations (version) VALUES ('0');
+