large_text_field 1.0.1 → 1.0.2.pre.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddbca2fa8dc69506b315b0eebd188bb0853d9ed21fdce60f7e1c0ed672030354
4
- data.tar.gz: c81cb6d8504445daded38df9473f89aa3ddffbcbb7269f8c3864b61a5944accb
3
+ metadata.gz: 02daae5b81c9b3ebef6f0e373e74a773df8bbdaa62df75c09b24b5743dc0fe55
4
+ data.tar.gz: c87ac6a50da96644a853cb70dc976644bc21dd44a8c0d1b8e70fe90a8b459ac8
5
5
  SHA512:
6
- metadata.gz: 1f6597f7cd562d6efc2306871c358bd01cb620deab5e895a1954b849efb9d7fa656e5f71a236ddc0fc9da4529d71023040fcc236e474d01e5bf51e037df023ea
7
- data.tar.gz: 562fe2682da3135ef197d2e04257612363512498f6807b607e1bfc0f622584910e7d253f1043412e9a308ae30c8512f480548d230885d4a4771f16d6dde3b04b
6
+ metadata.gz: 413ecb6c2949f64ffb298c9ce35cabd57e4791ad5994cd67b6d26f1092baf90430279910d7b0ac00412753628e4973059ac62df66dfb9f60184c247e81745639
7
+ data.tar.gz: c809eabe4ee4995de694d5fa41fbaac7e6df37cd36812136389837dc41e58a7310b40b224c1638f682b3be1835fd56a14395199be47d2f3c308a9da964b67322
@@ -27,8 +27,8 @@ module LargeTextField
27
27
  result
28
28
  end
29
29
 
30
- def reload
31
- super
30
+ def reload(options = nil)
31
+ super(options)
32
32
  @text_field_hash = nil
33
33
  self
34
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LargeTextField
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2.pre.1"
5
5
  end
@@ -12,11 +12,23 @@ development:
12
12
  # Warning: The database defined as "test" will be erased and
13
13
  # re-generated from your development database when you run "rake".
14
14
  # Do not set this db to the same as development or production.
15
+ <% if ENV["USE_MYSQL_DB"] %>
16
+ test:
17
+ adapter: mysql2
18
+ encoding: utf8
19
+ reconnect: false
20
+ database: large_text_field_test
21
+ pool: 5
22
+ username: <%= ENV['DATABASE_MYSQL_USERNAME'] || 'root' %>
23
+ password: <%= ENV['DATABASE_MYSQL_PASSWORD'] || '' %>
24
+ host: <%= ENV['DATABASE_MYSQL_HOST'] || 'localhost' %>
25
+ <% else %>
15
26
  test:
16
27
  adapter: sqlite3
17
28
  database: <%= ENV['TEST_DB'].presence || 'db/test.sqlite3' %>
18
29
  pool: 5
19
30
  timeout: 5000
31
+ <% end %>
20
32
 
21
33
  production:
22
34
  adapter: sqlite3
File without changes
@@ -1,5 +1,4 @@
1
- # frozen_string_literal: true
2
-
1
+ # encoding: UTF-8
3
2
  # This file is auto-generated from the current state of the database. Instead
4
3
  # of editing this file, please use the migrations feature of Active Record to
5
4
  # incrementally modify your database, and then regenerate this schema definition.
@@ -12,17 +11,19 @@
12
11
  #
13
12
  # It's strongly recommended that you check this file into your version control system.
14
13
 
15
- ActiveRecord::Schema.define(version: 20_160_217_033_529) do
14
+ ActiveRecord::Schema.define(version: 20160217033529) do
15
+
16
16
  create_table "large_text_fields", force: :cascade do |t|
17
- t.string "field_name", null: false
18
- t.text "value", limit: 16_777_215
19
- t.integer "owner_id", null: false
20
- t.string "owner_type", null: false
17
+ t.string "field_name", limit: 255, null: false
18
+ t.text "value", limit: 16777215
19
+ t.integer "owner_id", limit: 4, null: false
20
+ t.string "owner_type", limit: 255, null: false
21
21
  end
22
22
 
23
- add_index "large_text_fields", %w[owner_type owner_id field_name], name: "large_text_field_by_owner_field", unique: true
23
+ add_index "large_text_fields", ["owner_type", "owner_id", "field_name"], name: "large_text_field_by_owner_field", unique: true, using: :btree
24
24
 
25
25
  create_table "libraries", force: :cascade do |t|
26
- t.string "name", null: false
26
+ t.string "name", limit: 255, null: false
27
27
  end
28
+
28
29
  end
Binary file
@@ -0,0 +1,39 @@
1
+  (2.3ms) CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL) 
2
+  (0.1ms) select sqlite_version(*)
3
+  (1.7ms) CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")
4
+  (1.7ms) CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL)
5
+  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
6
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
7
+  (0.1ms) SELECT version FROM "schema_migrations"
8
+  (1.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20160217033529')
9
+  (1.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20110217210640')
10
+  (1.8ms) DROP TABLE "large_text_fields"
11
+  (1.4ms) CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL) 
12
+  (0.1ms) select sqlite_version(*)
13
+  (6.1ms) CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")
14
+  (1.3ms) DROP TABLE "libraries"
15
+  (1.6ms) CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL) 
16
+  (0.1ms) SELECT version FROM "schema_migrations"
17
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
18
+  (1.6ms) DROP TABLE "large_text_fields"
19
+  (1.1ms) CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL)
20
+  (0.0ms) select sqlite_version(*)
21
+  (1.2ms) CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")
22
+  (1.2ms) DROP TABLE "libraries"
23
+  (1.0ms) CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL)
24
+  (0.3ms) SELECT version FROM "schema_migrations"
25
+  (1.2ms) DROP TABLE "large_text_fields"
26
+  (1.2ms) CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL) 
27
+  (0.0ms) select sqlite_version(*)
28
+  (1.1ms) CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")
29
+  (1.1ms) DROP TABLE "libraries"
30
+  (1.2ms) CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL) 
31
+  (0.1ms) SELECT version FROM "schema_migrations"
32
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
33
+  (1.4ms) DROP TABLE "large_text_fields"
34
+  (1.2ms) CREATE TABLE "large_text_fields" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field_name" varchar NOT NULL, "value" text(16777215), "owner_id" integer NOT NULL, "owner_type" varchar NOT NULL)
35
+  (0.0ms) select sqlite_version(*)
36
+  (1.1ms) CREATE UNIQUE INDEX "large_text_field_by_owner_field" ON "large_text_fields" ("owner_type", "owner_id", "field_name")
37
+  (1.1ms) DROP TABLE "libraries"
38
+  (0.9ms) CREATE TABLE "libraries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL)
39
+  (0.1ms) SELECT version FROM "schema_migrations"