smart_field_constraints 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +13 -0
- data/LICENSE +20 -0
- data/README +60 -0
- data/Rakefile +79 -0
- data/init.rb +1 -0
- data/lib/smart_field_constraints/extensions/form_helper.rb +40 -0
- data/lib/smart_field_constraints/extensions/validations.rb +64 -0
- data/lib/smart_field_constraints.rb +2 -0
- data/test/app_root/app/models/user.rb +2 -0
- data/test/app_root/db/migrate/001_create_users.rb +13 -0
- data/test/app_root/log/in_memory.log +580 -0
- data/test/test_helper.rb +7 -0
- data/test/unit/form_helper_test.rb +89 -0
- data/test/unit/validations_test.rb +44 -0
- metadata +76 -0
data/CHANGELOG
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
*SVN*
|
2
|
+
|
3
|
+
*0.0.1* (May 5th, 2008)
|
4
|
+
|
5
|
+
* Initial public release
|
6
|
+
|
7
|
+
* Add documentation
|
8
|
+
|
9
|
+
* Remove maxlength attribute for textare tags since it's not valid html
|
10
|
+
|
11
|
+
* Don't set the size based on the smart maxlength
|
12
|
+
|
13
|
+
* Don't expect columns to exist for every attribute
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2007-2008 Aaron Pfeifer
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
= smart_field_constraints
|
2
|
+
|
3
|
+
+smart_field_constraints+ intelligently applies a maxlength attribute for text
|
4
|
+
fields based on column constraints and validations.
|
5
|
+
|
6
|
+
== Resources
|
7
|
+
|
8
|
+
Wiki
|
9
|
+
|
10
|
+
* http://wiki.pluginaweek.org/Smart_field_constraints
|
11
|
+
|
12
|
+
API
|
13
|
+
|
14
|
+
* http://api.pluginaweek.org/smart_field_constraints
|
15
|
+
|
16
|
+
Development
|
17
|
+
|
18
|
+
* http://dev.pluginaweek.org/browser/trunk/smart_field_constraints
|
19
|
+
|
20
|
+
Source
|
21
|
+
|
22
|
+
* http://svn.pluginaweek.org/trunk/smart_field_constraints
|
23
|
+
|
24
|
+
== Description
|
25
|
+
|
26
|
+
HTML input field restrictions within forms can often help with both validation
|
27
|
+
and improving the user experience. Normally, adding the +maxlength+ configuration
|
28
|
+
option for input fields is not DRY and duplicates data already available in the
|
29
|
+
model or database. This plugin helps make this automatic.
|
30
|
+
|
31
|
+
+smart_field_cosntraints+ looks in two places for determining the maxlength value
|
32
|
+
for an input field:
|
33
|
+
* Model validates_length_of validations
|
34
|
+
* Database column definitions (limits specifically)
|
35
|
+
|
36
|
+
Model validations will always take preference over database column definitions.
|
37
|
+
|
38
|
+
== Usage
|
39
|
+
|
40
|
+
There's nothing that you need to change to be able to use this plugin. It'll
|
41
|
+
just start automatically adding the +maxlength+ values it finds based on the
|
42
|
+
information described above (unless you define that option yourself).
|
43
|
+
|
44
|
+
=== Example
|
45
|
+
|
46
|
+
Model:
|
47
|
+
class User < ActiveRecord::Base
|
48
|
+
validates_length_of :login, :maximum => 12
|
49
|
+
end
|
50
|
+
|
51
|
+
View:
|
52
|
+
text_field(:user, :login)
|
53
|
+
|
54
|
+
HTML:
|
55
|
+
<input id="user_login" maxlength="12" name="user[login]" size="30" type="text" />
|
56
|
+
|
57
|
+
== Testing
|
58
|
+
|
59
|
+
Before you can run any tests, the following gem must be installed:
|
60
|
+
* plugin_test_helper[http://wiki.pluginaweek.org/Plugin_test_helper]
|
data/Rakefile
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'rake/testtask'
|
2
|
+
require 'rake/rdoctask'
|
3
|
+
require 'rake/gempackagetask'
|
4
|
+
require 'rake/contrib/sshpublisher'
|
5
|
+
|
6
|
+
PKG_NAME = 'smart_field_constraints'
|
7
|
+
PKG_VERSION = '0.0.1'
|
8
|
+
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
9
|
+
RUBY_FORGE_PROJECT = 'pluginaweek'
|
10
|
+
|
11
|
+
desc 'Default: run unit tests.'
|
12
|
+
task :default => :test
|
13
|
+
|
14
|
+
desc 'Test the smart_field_constraints plugin.'
|
15
|
+
Rake::TestTask.new(:test) do |t|
|
16
|
+
t.libs << 'lib'
|
17
|
+
t.pattern = 'test/**/*_test.rb'
|
18
|
+
t.verbose = true
|
19
|
+
end
|
20
|
+
|
21
|
+
desc 'Generate documentation for the smart_field_constraints plugin.'
|
22
|
+
Rake::RDocTask.new(:rdoc) do |rdoc|
|
23
|
+
rdoc.rdoc_dir = 'rdoc'
|
24
|
+
rdoc.title = 'SmartFieldConstraints'
|
25
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
26
|
+
rdoc.rdoc_files.include('README')
|
27
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
28
|
+
end
|
29
|
+
|
30
|
+
spec = Gem::Specification.new do |s|
|
31
|
+
s.name = PKG_NAME
|
32
|
+
s.version = PKG_VERSION
|
33
|
+
s.platform = Gem::Platform::RUBY
|
34
|
+
s.summary = 'Intelligently applies a maxlength attribute for text fields based on column constraints and validations'
|
35
|
+
|
36
|
+
s.files = FileList['{lib,test}/**/*'].to_a + %w(CHANGELOG init.rb LICENSE Rakefile README)
|
37
|
+
s.require_path = 'lib'
|
38
|
+
s.autorequire = 'smart_field_constraints'
|
39
|
+
s.has_rdoc = true
|
40
|
+
s.test_files = Dir['test/**/*_test.rb']
|
41
|
+
|
42
|
+
s.author = 'Aaron Pfeifer'
|
43
|
+
s.email = 'aaron@pluginaweek.org'
|
44
|
+
s.homepage = 'http://www.pluginaweek.org'
|
45
|
+
end
|
46
|
+
|
47
|
+
Rake::GemPackageTask.new(spec) do |p|
|
48
|
+
p.gem_spec = spec
|
49
|
+
p.need_tar = true
|
50
|
+
p.need_zip = true
|
51
|
+
end
|
52
|
+
|
53
|
+
desc 'Publish the beta gem'
|
54
|
+
task :pgem => [:package] do
|
55
|
+
Rake::SshFilePublisher.new('aaron@pluginaweek.org', '/home/aaron/gems.pluginaweek.org/public/gems', 'pkg', "#{PKG_FILE_NAME}.gem").upload
|
56
|
+
end
|
57
|
+
|
58
|
+
desc 'Publish the API documentation'
|
59
|
+
task :pdoc => [:rdoc] do
|
60
|
+
Rake::SshDirPublisher.new('aaron@pluginaweek.org', "/home/aaron/api.pluginaweek.org/public/#{PKG_NAME}", 'rdoc').upload
|
61
|
+
end
|
62
|
+
|
63
|
+
desc 'Publish the API docs and gem'
|
64
|
+
task :publish => [:pdoc, :release]
|
65
|
+
|
66
|
+
desc 'Publish the release files to RubyForge.'
|
67
|
+
task :release => [:gem, :package] do
|
68
|
+
require 'rubyforge'
|
69
|
+
|
70
|
+
ruby_forge = RubyForge.new
|
71
|
+
ruby_forge.login
|
72
|
+
|
73
|
+
%w( gem tgz zip ).each do |ext|
|
74
|
+
file = "pkg/#{PKG_FILE_NAME}.#{ext}"
|
75
|
+
puts "Releasing #{File.basename(file)}..."
|
76
|
+
|
77
|
+
ruby_forge.add_release(RUBY_FORGE_PROJECT, PKG_NAME, PKG_VERSION, file)
|
78
|
+
end
|
79
|
+
end
|
data/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'smart_field_constraints'
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module PluginAWeek #:nodoc:
|
2
|
+
module SmartFieldConstraints
|
3
|
+
module Extensions #:nodoc:
|
4
|
+
# Automatically applies maximum length for an input field if it can be determined
|
5
|
+
module InstanceTag
|
6
|
+
def self.included(base) #:nodoc:
|
7
|
+
base.class_eval do
|
8
|
+
alias_method_chain :to_input_field_tag, :smart_constraints
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# Applies constraints for the given field
|
13
|
+
def to_input_field_tag_with_smart_constraints(field_type, options = {})
|
14
|
+
options.stringify_keys!
|
15
|
+
|
16
|
+
# Only check password and text fields
|
17
|
+
if %w(password text).include?(field_type) && !options['maxlength'] && object
|
18
|
+
# Look for the attribute's maximum length from tracked validations or
|
19
|
+
# the column's definition
|
20
|
+
max_length = object.class.smart_length_constraints[method_name] || (column = object.class.columns_hash[method_name]) && column.limit
|
21
|
+
|
22
|
+
if max_length
|
23
|
+
# If the size isn't specified, use the caller's maxlength of the default value.
|
24
|
+
# This must be done here, otherwise it'll use the maxlength value that
|
25
|
+
# we apply here
|
26
|
+
options['size'] ||= options['maxlength'] || ActionView::Helpers::InstanceTag::DEFAULT_FIELD_OPTIONS['size']
|
27
|
+
options['maxlength'] = max_length
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
to_input_field_tag_without_smart_constraints(field_type, options)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
ActionView::Helpers::InstanceTag.class_eval do
|
39
|
+
include PluginAWeek::SmartFieldConstraints::Extensions::InstanceTag
|
40
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
module PluginAWeek #:nodoc:
|
2
|
+
module SmartFieldConstraints
|
3
|
+
module Extensions #:nodoc:
|
4
|
+
# Tracks validations on the length of fields so that they can be used when
|
5
|
+
# generate form tags for those fields
|
6
|
+
module Validations
|
7
|
+
def self.included(base) #:nodoc:
|
8
|
+
base.class_eval do
|
9
|
+
extend PluginAWeek::SmartFieldConstraints::Extensions::Validations::ClassMethods
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
module ClassMethods
|
14
|
+
def self.extended(base) #:nodoc:
|
15
|
+
base.class_eval do
|
16
|
+
class_inheritable_hash :smart_length_constraints
|
17
|
+
self.smart_length_constraints = {}
|
18
|
+
end
|
19
|
+
|
20
|
+
class << base
|
21
|
+
alias_method_chain :validates_length_of, :smart_constraints
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# Tracks what the maximum value that's allowed for all of the attributes
|
26
|
+
# being validated
|
27
|
+
def validates_length_of_with_smart_constraints(*attrs)
|
28
|
+
options = attrs.last
|
29
|
+
if options.is_a?(Hash)
|
30
|
+
# Extract the option restricting the length
|
31
|
+
options = options.symbolize_keys
|
32
|
+
range_options = ActiveRecord::Validations::ClassMethods::ALL_RANGE_OPTIONS & options.keys
|
33
|
+
option = range_options.first
|
34
|
+
option_value = options[range_options.first]
|
35
|
+
|
36
|
+
# Find the max value from ranges or specific maximums
|
37
|
+
max_length = nil
|
38
|
+
case option
|
39
|
+
when :within, :in
|
40
|
+
max_length = option_value.end
|
41
|
+
when :maximum, :is
|
42
|
+
max_length = option_value
|
43
|
+
end
|
44
|
+
|
45
|
+
if max_length
|
46
|
+
# Store the maximum value for each attribute so that it can be referenced later
|
47
|
+
attrs.each do |attr|
|
48
|
+
self.smart_length_constraints ||= {}
|
49
|
+
self.smart_length_constraints[attr.to_s] = max_length
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
validates_length_of_without_smart_constraints(*attrs)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
ActiveRecord::Base.class_eval do
|
63
|
+
include PluginAWeek::SmartFieldConstraints::Extensions::Validations
|
64
|
+
end
|
@@ -0,0 +1,580 @@
|
|
1
|
+
# Logfile created on Sat May 03 16:37:19 -0400 2008 [4;36;1mSQL (0.000456)[0m [0;1m SELECT name
|
2
|
+
FROM sqlite_master
|
3
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
4
|
+
[0m
|
5
|
+
[4;35;1mSQL (0.000235)[0m [0mselect sqlite_version(*)[0m
|
6
|
+
[4;36;1mSQL (0.000308)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
7
|
+
[4;35;1mSQL (0.000229)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
8
|
+
[4;36;1mSQL (0.000212)[0m [0;1m SELECT name
|
9
|
+
FROM sqlite_master
|
10
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
11
|
+
[0m
|
12
|
+
[4;35;1mSQL (0.000141)[0m [0mSELECT version FROM schema_migrations[0m
|
13
|
+
Migrating to CreateUsers (1)
|
14
|
+
[4;36;1mSQL (0.000093)[0m [0;1mSELECT version FROM schema_migrations[0m
|
15
|
+
[4;35;1mSQL (0.000400)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
16
|
+
[4;36;1mSQL (0.000124)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
17
|
+
[4;36;1mSQL (0.000457)[0m [0;1m SELECT name
|
18
|
+
FROM sqlite_master
|
19
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
20
|
+
[0m
|
21
|
+
[4;35;1mSQL (0.000258)[0m [0mselect sqlite_version(*)[0m
|
22
|
+
[4;36;1mSQL (0.000310)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
23
|
+
[4;35;1mSQL (0.000221)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
24
|
+
[4;36;1mSQL (0.000211)[0m [0;1m SELECT name
|
25
|
+
FROM sqlite_master
|
26
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
27
|
+
[0m
|
28
|
+
[4;35;1mSQL (0.000159)[0m [0mSELECT version FROM schema_migrations[0m
|
29
|
+
Migrating to CreateUsers (1)
|
30
|
+
[4;36;1mSQL (0.000138)[0m [0;1mSELECT version FROM schema_migrations[0m
|
31
|
+
[4;35;1mSQL (0.000404)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
32
|
+
[4;36;1mSQL (0.000126)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
33
|
+
[4;36;1mSQL (0.000456)[0m [0;1m SELECT name
|
34
|
+
FROM sqlite_master
|
35
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
36
|
+
[0m
|
37
|
+
[4;35;1mSQL (0.000232)[0m [0mselect sqlite_version(*)[0m
|
38
|
+
[4;36;1mSQL (0.000308)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
39
|
+
[4;35;1mSQL (0.000224)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
40
|
+
[4;36;1mSQL (0.000207)[0m [0;1m SELECT name
|
41
|
+
FROM sqlite_master
|
42
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
43
|
+
[0m
|
44
|
+
[4;35;1mSQL (0.000151)[0m [0mSELECT version FROM schema_migrations[0m
|
45
|
+
Migrating to CreateUsers (1)
|
46
|
+
[4;36;1mSQL (0.000095)[0m [0;1mSELECT version FROM schema_migrations[0m
|
47
|
+
[4;35;1mSQL (0.001146)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
48
|
+
[4;36;1mSQL (0.000134)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
49
|
+
[4;35;1mSQL (0.000376)[0m [0m SELECT name
|
50
|
+
FROM sqlite_master
|
51
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
52
|
+
[0m
|
53
|
+
[4;36;1mSQL (0.000450)[0m [0;1m SELECT name
|
54
|
+
FROM sqlite_master
|
55
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
56
|
+
[0m
|
57
|
+
[4;35;1mSQL (0.000233)[0m [0mselect sqlite_version(*)[0m
|
58
|
+
[4;36;1mSQL (0.000310)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
59
|
+
[4;35;1mSQL (0.000222)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
60
|
+
[4;36;1mSQL (0.000207)[0m [0;1m SELECT name
|
61
|
+
FROM sqlite_master
|
62
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
63
|
+
[0m
|
64
|
+
[4;35;1mSQL (0.000131)[0m [0mSELECT version FROM schema_migrations[0m
|
65
|
+
Migrating to CreateUsers (1)
|
66
|
+
[4;36;1mSQL (0.000093)[0m [0;1mSELECT version FROM schema_migrations[0m
|
67
|
+
[4;35;1mSQL (0.000391)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
68
|
+
[4;36;1mSQL (0.000137)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
69
|
+
[4;36;1mSQL (0.000488)[0m [0;1m SELECT name
|
70
|
+
FROM sqlite_master
|
71
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
72
|
+
[0m
|
73
|
+
[4;35;1mSQL (0.000325)[0m [0mselect sqlite_version(*)[0m
|
74
|
+
[4;36;1mSQL (0.000391)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
75
|
+
[4;35;1mSQL (0.000255)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
76
|
+
[4;36;1mSQL (0.000233)[0m [0;1m SELECT name
|
77
|
+
FROM sqlite_master
|
78
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
79
|
+
[0m
|
80
|
+
[4;35;1mSQL (0.000137)[0m [0mSELECT version FROM schema_migrations[0m
|
81
|
+
Migrating to CreateUsers (1)
|
82
|
+
[4;36;1mSQL (0.000093)[0m [0;1mSELECT version FROM schema_migrations[0m
|
83
|
+
[4;35;1mSQL (0.000414)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
84
|
+
[4;36;1mSQL (0.000121)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
85
|
+
[4;36;1mSQL (0.000453)[0m [0;1m SELECT name
|
86
|
+
FROM sqlite_master
|
87
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
88
|
+
[0m
|
89
|
+
[4;35;1mSQL (0.000239)[0m [0mselect sqlite_version(*)[0m
|
90
|
+
[4;36;1mSQL (0.000314)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
91
|
+
[4;35;1mSQL (0.000223)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
92
|
+
[4;36;1mSQL (0.000214)[0m [0;1m SELECT name
|
93
|
+
FROM sqlite_master
|
94
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
95
|
+
[0m
|
96
|
+
[4;35;1mSQL (0.000138)[0m [0mSELECT version FROM schema_migrations[0m
|
97
|
+
Migrating to CreateUsers (1)
|
98
|
+
[4;36;1mSQL (0.000093)[0m [0;1mSELECT version FROM schema_migrations[0m
|
99
|
+
[4;35;1mSQL (0.000388)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
100
|
+
[4;36;1mSQL (0.000122)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
101
|
+
[4;36;1mSQL (0.000456)[0m [0;1m SELECT name
|
102
|
+
FROM sqlite_master
|
103
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
104
|
+
[0m
|
105
|
+
[4;35;1mSQL (0.000228)[0m [0mselect sqlite_version(*)[0m
|
106
|
+
[4;36;1mSQL (0.000311)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
107
|
+
[4;35;1mSQL (0.000233)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
108
|
+
[4;36;1mSQL (0.000214)[0m [0;1m SELECT name
|
109
|
+
FROM sqlite_master
|
110
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
111
|
+
[0m
|
112
|
+
[4;35;1mSQL (0.000130)[0m [0mSELECT version FROM schema_migrations[0m
|
113
|
+
Migrating to CreateUsers (1)
|
114
|
+
[4;36;1mSQL (0.000093)[0m [0;1mSELECT version FROM schema_migrations[0m
|
115
|
+
[4;35;1mSQL (0.000402)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
116
|
+
[4;36;1mSQL (0.000127)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
117
|
+
[4;36;1mSQL (0.000473)[0m [0;1m SELECT name
|
118
|
+
FROM sqlite_master
|
119
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
120
|
+
[0m
|
121
|
+
[4;35;1mSQL (0.000261)[0m [0mselect sqlite_version(*)[0m
|
122
|
+
[4;36;1mSQL (0.000309)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
123
|
+
[4;35;1mSQL (0.000246)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
124
|
+
[4;36;1mSQL (0.000210)[0m [0;1m SELECT name
|
125
|
+
FROM sqlite_master
|
126
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
127
|
+
[0m
|
128
|
+
[4;35;1mSQL (0.000142)[0m [0mSELECT version FROM schema_migrations[0m
|
129
|
+
Migrating to CreateUsers (1)
|
130
|
+
[4;36;1mSQL (0.000092)[0m [0;1mSELECT version FROM schema_migrations[0m
|
131
|
+
[4;35;1mSQL (0.000395)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
132
|
+
[4;36;1mSQL (0.000125)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
133
|
+
[4;36;1mSQL (0.000469)[0m [0;1m SELECT name
|
134
|
+
FROM sqlite_master
|
135
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
136
|
+
[0m
|
137
|
+
[4;35;1mSQL (0.000258)[0m [0mselect sqlite_version(*)[0m
|
138
|
+
[4;36;1mSQL (0.000313)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
139
|
+
[4;35;1mSQL (0.000222)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
140
|
+
[4;36;1mSQL (0.000231)[0m [0;1m SELECT name
|
141
|
+
FROM sqlite_master
|
142
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
143
|
+
[0m
|
144
|
+
[4;35;1mSQL (0.000127)[0m [0mSELECT version FROM schema_migrations[0m
|
145
|
+
Migrating to CreateUsers (1)
|
146
|
+
[4;36;1mSQL (0.000095)[0m [0;1mSELECT version FROM schema_migrations[0m
|
147
|
+
[4;35;1mSQL (0.000462)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
148
|
+
[4;36;1mSQL (0.000143)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
149
|
+
[4;36;1mSQL (0.000474)[0m [0;1m SELECT name
|
150
|
+
FROM sqlite_master
|
151
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
152
|
+
[0m
|
153
|
+
[4;35;1mSQL (0.001692)[0m [0mselect sqlite_version(*)[0m
|
154
|
+
[4;36;1mSQL (0.000411)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
155
|
+
[4;35;1mSQL (0.000271)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
156
|
+
[4;36;1mSQL (0.000246)[0m [0;1m SELECT name
|
157
|
+
FROM sqlite_master
|
158
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
159
|
+
[0m
|
160
|
+
[4;35;1mSQL (0.000166)[0m [0mSELECT version FROM schema_migrations[0m
|
161
|
+
Migrating to CreateUsers (1)
|
162
|
+
[4;36;1mSQL (0.000110)[0m [0;1mSELECT version FROM schema_migrations[0m
|
163
|
+
[4;35;1mSQL (0.000423)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
164
|
+
[4;36;1mSQL (0.000202)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
165
|
+
[4;36;1mSQL (0.000455)[0m [0;1m SELECT name
|
166
|
+
FROM sqlite_master
|
167
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
168
|
+
[0m
|
169
|
+
[4;35;1mSQL (0.000243)[0m [0mselect sqlite_version(*)[0m
|
170
|
+
[4;36;1mSQL (0.000312)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
171
|
+
[4;35;1mSQL (0.000248)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
172
|
+
[4;36;1mSQL (0.000229)[0m [0;1m SELECT name
|
173
|
+
FROM sqlite_master
|
174
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
175
|
+
[0m
|
176
|
+
[4;35;1mSQL (0.000133)[0m [0mSELECT version FROM schema_migrations[0m
|
177
|
+
Migrating to CreateUsers (1)
|
178
|
+
[4;36;1mSQL (0.000093)[0m [0;1mSELECT version FROM schema_migrations[0m
|
179
|
+
[4;35;1mSQL (0.000412)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
180
|
+
[4;36;1mSQL (0.000128)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
181
|
+
[4;36;1mSQL (0.000446)[0m [0;1m SELECT name
|
182
|
+
FROM sqlite_master
|
183
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
184
|
+
[0m
|
185
|
+
[4;35;1mSQL (0.000230)[0m [0mselect sqlite_version(*)[0m
|
186
|
+
[4;36;1mSQL (0.000305)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
187
|
+
[4;35;1mSQL (0.000246)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
188
|
+
[4;36;1mSQL (0.000213)[0m [0;1m SELECT name
|
189
|
+
FROM sqlite_master
|
190
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
191
|
+
[0m
|
192
|
+
[4;35;1mSQL (0.000152)[0m [0mSELECT version FROM schema_migrations[0m
|
193
|
+
Migrating to CreateUsers (1)
|
194
|
+
[4;36;1mSQL (0.000124)[0m [0;1mSELECT version FROM schema_migrations[0m
|
195
|
+
[4;35;1mSQL (0.000438)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
196
|
+
[4;36;1mSQL (0.000127)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
197
|
+
[4;36;1mSQL (0.000460)[0m [0;1m SELECT name
|
198
|
+
FROM sqlite_master
|
199
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
200
|
+
[0m
|
201
|
+
[4;35;1mSQL (0.000408)[0m [0mselect sqlite_version(*)[0m
|
202
|
+
[4;36;1mSQL (0.000346)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
203
|
+
[4;35;1mSQL (0.000225)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
204
|
+
[4;36;1mSQL (0.000217)[0m [0;1m SELECT name
|
205
|
+
FROM sqlite_master
|
206
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
207
|
+
[0m
|
208
|
+
[4;35;1mSQL (0.000135)[0m [0mSELECT version FROM schema_migrations[0m
|
209
|
+
Migrating to CreateUsers (1)
|
210
|
+
[4;36;1mSQL (0.000092)[0m [0;1mSELECT version FROM schema_migrations[0m
|
211
|
+
[4;35;1mSQL (0.000391)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
212
|
+
[4;36;1mSQL (0.000122)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
213
|
+
[4;36;1mSQL (0.000472)[0m [0;1m SELECT name
|
214
|
+
FROM sqlite_master
|
215
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
216
|
+
[0m
|
217
|
+
[4;35;1mSQL (0.000225)[0m [0mselect sqlite_version(*)[0m
|
218
|
+
[4;36;1mSQL (0.000419)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
219
|
+
[4;35;1mSQL (0.000225)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
220
|
+
[4;36;1mSQL (0.000212)[0m [0;1m SELECT name
|
221
|
+
FROM sqlite_master
|
222
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
223
|
+
[0m
|
224
|
+
[4;35;1mSQL (0.000134)[0m [0mSELECT version FROM schema_migrations[0m
|
225
|
+
Migrating to CreateUsers (1)
|
226
|
+
[4;36;1mSQL (0.000092)[0m [0;1mSELECT version FROM schema_migrations[0m
|
227
|
+
[4;35;1mSQL (0.000424)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
228
|
+
[4;36;1mSQL (0.000125)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
229
|
+
[4;36;1mSQL (0.000449)[0m [0;1m SELECT name
|
230
|
+
FROM sqlite_master
|
231
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
232
|
+
[0m
|
233
|
+
[4;35;1mSQL (0.000228)[0m [0mselect sqlite_version(*)[0m
|
234
|
+
[4;36;1mSQL (0.000307)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
235
|
+
[4;35;1mSQL (0.000227)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
236
|
+
[4;36;1mSQL (0.000217)[0m [0;1m SELECT name
|
237
|
+
FROM sqlite_master
|
238
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
239
|
+
[0m
|
240
|
+
[4;35;1mSQL (0.000159)[0m [0mSELECT version FROM schema_migrations[0m
|
241
|
+
Migrating to CreateUsers (1)
|
242
|
+
[4;36;1mSQL (0.000094)[0m [0;1mSELECT version FROM schema_migrations[0m
|
243
|
+
[4;35;1mSQL (0.000430)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
244
|
+
[4;36;1mSQL (0.000384)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
245
|
+
[4;36;1mSQL (0.000459)[0m [0;1m SELECT name
|
246
|
+
FROM sqlite_master
|
247
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
248
|
+
[0m
|
249
|
+
[4;35;1mSQL (0.000229)[0m [0mselect sqlite_version(*)[0m
|
250
|
+
[4;36;1mSQL (0.000308)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
251
|
+
[4;35;1mSQL (0.000224)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
252
|
+
[4;36;1mSQL (0.000209)[0m [0;1m SELECT name
|
253
|
+
FROM sqlite_master
|
254
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
255
|
+
[0m
|
256
|
+
[4;35;1mSQL (0.000129)[0m [0mSELECT version FROM schema_migrations[0m
|
257
|
+
Migrating to CreateUsers (1)
|
258
|
+
[4;36;1mSQL (0.000092)[0m [0;1mSELECT version FROM schema_migrations[0m
|
259
|
+
[4;35;1mSQL (0.000392)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "name" varchar(255) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
260
|
+
[4;36;1mSQL (0.000135)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
261
|
+
[4;36;1mSQL (0.000453)[0m [0;1m SELECT name
|
262
|
+
FROM sqlite_master
|
263
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
264
|
+
[0m
|
265
|
+
[4;35;1mSQL (0.000227)[0m [0mselect sqlite_version(*)[0m
|
266
|
+
[4;36;1mSQL (0.000307)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
267
|
+
[4;35;1mSQL (0.000222)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
268
|
+
[4;36;1mSQL (0.000207)[0m [0;1m SELECT name
|
269
|
+
FROM sqlite_master
|
270
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
271
|
+
[0m
|
272
|
+
[4;35;1mSQL (0.000151)[0m [0mSELECT version FROM schema_migrations[0m
|
273
|
+
Migrating to CreateUsers (1)
|
274
|
+
[4;36;1mSQL (0.000093)[0m [0;1mSELECT version FROM schema_migrations[0m
|
275
|
+
[4;35;1mSQL (0.000390)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
276
|
+
[4;36;1mSQL (0.000122)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
277
|
+
[4;36;1mSQL (0.000473)[0m [0;1m SELECT name
|
278
|
+
FROM sqlite_master
|
279
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
280
|
+
[0m
|
281
|
+
[4;35;1mSQL (0.000228)[0m [0mselect sqlite_version(*)[0m
|
282
|
+
[4;36;1mSQL (0.000319)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
283
|
+
[4;35;1mSQL (0.000227)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
284
|
+
[4;36;1mSQL (0.000213)[0m [0;1m SELECT name
|
285
|
+
FROM sqlite_master
|
286
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
287
|
+
[0m
|
288
|
+
[4;35;1mSQL (0.000152)[0m [0mSELECT version FROM schema_migrations[0m
|
289
|
+
Migrating to CreateUsers (1)
|
290
|
+
[4;36;1mSQL (0.000092)[0m [0;1mSELECT version FROM schema_migrations[0m
|
291
|
+
[4;35;1mSQL (0.000386)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
292
|
+
[4;36;1mSQL (0.000121)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
293
|
+
[4;36;1mSQL (0.000454)[0m [0;1m SELECT name
|
294
|
+
FROM sqlite_master
|
295
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
296
|
+
[0m
|
297
|
+
[4;35;1mSQL (0.000225)[0m [0mselect sqlite_version(*)[0m
|
298
|
+
[4;36;1mSQL (0.000303)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
299
|
+
[4;35;1mSQL (0.000220)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
300
|
+
[4;36;1mSQL (0.000209)[0m [0;1m SELECT name
|
301
|
+
FROM sqlite_master
|
302
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
303
|
+
[0m
|
304
|
+
[4;35;1mSQL (0.000148)[0m [0mSELECT version FROM schema_migrations[0m
|
305
|
+
Migrating to CreateUsers (1)
|
306
|
+
[4;36;1mSQL (0.000094)[0m [0;1mSELECT version FROM schema_migrations[0m
|
307
|
+
[4;35;1mSQL (0.000438)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
308
|
+
[4;36;1mSQL (0.000170)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
309
|
+
[4;36;1mSQL (0.000449)[0m [0;1m SELECT name
|
310
|
+
FROM sqlite_master
|
311
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
312
|
+
[0m
|
313
|
+
[4;35;1mSQL (0.000235)[0m [0mselect sqlite_version(*)[0m
|
314
|
+
[4;36;1mSQL (0.000315)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
315
|
+
[4;35;1mSQL (0.000223)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
316
|
+
[4;36;1mSQL (0.000210)[0m [0;1m SELECT name
|
317
|
+
FROM sqlite_master
|
318
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
319
|
+
[0m
|
320
|
+
[4;35;1mSQL (0.000154)[0m [0mSELECT version FROM schema_migrations[0m
|
321
|
+
Migrating to CreateUsers (1)
|
322
|
+
[4;36;1mSQL (0.000105)[0m [0;1mSELECT version FROM schema_migrations[0m
|
323
|
+
[4;35;1mSQL (0.000407)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
324
|
+
[4;36;1mSQL (0.000123)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
325
|
+
[4;36;1mSQL (0.000485)[0m [0;1m SELECT name
|
326
|
+
FROM sqlite_master
|
327
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
328
|
+
[0m
|
329
|
+
[4;35;1mSQL (0.000264)[0m [0mselect sqlite_version(*)[0m
|
330
|
+
[4;36;1mSQL (0.000312)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
331
|
+
[4;35;1mSQL (0.000572)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
332
|
+
[4;36;1mSQL (0.000237)[0m [0;1m SELECT name
|
333
|
+
FROM sqlite_master
|
334
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
335
|
+
[0m
|
336
|
+
[4;35;1mSQL (0.000130)[0m [0mSELECT version FROM schema_migrations[0m
|
337
|
+
Migrating to CreateUsers (1)
|
338
|
+
[4;36;1mSQL (0.000094)[0m [0;1mSELECT version FROM schema_migrations[0m
|
339
|
+
[4;35;1mSQL (0.000382)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
340
|
+
[4;36;1mSQL (0.000122)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
341
|
+
[4;36;1mSQL (0.000452)[0m [0;1m SELECT name
|
342
|
+
FROM sqlite_master
|
343
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
344
|
+
[0m
|
345
|
+
[4;35;1mSQL (0.000229)[0m [0mselect sqlite_version(*)[0m
|
346
|
+
[4;36;1mSQL (0.000307)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
347
|
+
[4;35;1mSQL (0.000222)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
348
|
+
[4;36;1mSQL (0.000208)[0m [0;1m SELECT name
|
349
|
+
FROM sqlite_master
|
350
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
351
|
+
[0m
|
352
|
+
[4;35;1mSQL (0.000154)[0m [0mSELECT version FROM schema_migrations[0m
|
353
|
+
Migrating to CreateUsers (1)
|
354
|
+
[4;36;1mSQL (0.000093)[0m [0;1mSELECT version FROM schema_migrations[0m
|
355
|
+
[4;35;1mSQL (0.000387)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
356
|
+
[4;36;1mSQL (0.000122)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
357
|
+
[4;36;1mSQL (0.000454)[0m [0;1m SELECT name
|
358
|
+
FROM sqlite_master
|
359
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
360
|
+
[0m
|
361
|
+
[4;35;1mSQL (0.000230)[0m [0mselect sqlite_version(*)[0m
|
362
|
+
[4;36;1mSQL (0.000329)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
363
|
+
[4;35;1mSQL (0.000225)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
364
|
+
[4;36;1mSQL (0.000225)[0m [0;1m SELECT name
|
365
|
+
FROM sqlite_master
|
366
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
367
|
+
[0m
|
368
|
+
[4;35;1mSQL (0.000155)[0m [0mSELECT version FROM schema_migrations[0m
|
369
|
+
Migrating to CreateUsers (1)
|
370
|
+
[4;36;1mSQL (0.000104)[0m [0;1mSELECT version FROM schema_migrations[0m
|
371
|
+
[4;35;1mSQL (0.000411)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
372
|
+
[4;36;1mSQL (0.000123)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
373
|
+
[4;36;1mSQL (0.000464)[0m [0;1m SELECT name
|
374
|
+
FROM sqlite_master
|
375
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
376
|
+
[0m
|
377
|
+
[4;35;1mSQL (0.000247)[0m [0mselect sqlite_version(*)[0m
|
378
|
+
[4;36;1mSQL (0.000322)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
379
|
+
[4;35;1mSQL (0.000253)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
380
|
+
[4;36;1mSQL (0.000215)[0m [0;1m SELECT name
|
381
|
+
FROM sqlite_master
|
382
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
383
|
+
[0m
|
384
|
+
[4;35;1mSQL (0.000160)[0m [0mSELECT version FROM schema_migrations[0m
|
385
|
+
Migrating to CreateUsers (1)
|
386
|
+
[4;36;1mSQL (0.000095)[0m [0;1mSELECT version FROM schema_migrations[0m
|
387
|
+
[4;35;1mSQL (0.000395)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
388
|
+
[4;36;1mSQL (0.000134)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
389
|
+
[4;36;1mSQL (0.000476)[0m [0;1m SELECT name
|
390
|
+
FROM sqlite_master
|
391
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
392
|
+
[0m
|
393
|
+
[4;35;1mSQL (0.000230)[0m [0mselect sqlite_version(*)[0m
|
394
|
+
[4;36;1mSQL (0.000309)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
395
|
+
[4;35;1mSQL (0.000222)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
396
|
+
[4;36;1mSQL (0.000210)[0m [0;1m SELECT name
|
397
|
+
FROM sqlite_master
|
398
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
399
|
+
[0m
|
400
|
+
[4;35;1mSQL (0.000150)[0m [0mSELECT version FROM schema_migrations[0m
|
401
|
+
Migrating to CreateUsers (1)
|
402
|
+
[4;36;1mSQL (0.000092)[0m [0;1mSELECT version FROM schema_migrations[0m
|
403
|
+
[4;35;1mSQL (0.000394)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
404
|
+
[4;36;1mSQL (0.000121)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
405
|
+
[4;36;1mSQL (0.000457)[0m [0;1m SELECT name
|
406
|
+
FROM sqlite_master
|
407
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
408
|
+
[0m
|
409
|
+
[4;35;1mSQL (0.000235)[0m [0mselect sqlite_version(*)[0m
|
410
|
+
[4;36;1mSQL (0.000309)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
411
|
+
[4;35;1mSQL (0.000222)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
412
|
+
[4;36;1mSQL (0.000210)[0m [0;1m SELECT name
|
413
|
+
FROM sqlite_master
|
414
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
415
|
+
[0m
|
416
|
+
[4;35;1mSQL (0.000132)[0m [0mSELECT version FROM schema_migrations[0m
|
417
|
+
Migrating to CreateUsers (1)
|
418
|
+
[4;36;1mSQL (0.000092)[0m [0;1mSELECT version FROM schema_migrations[0m
|
419
|
+
[4;35;1mSQL (0.000381)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
420
|
+
[4;36;1mSQL (0.000123)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
421
|
+
[4;36;1mSQL (0.000462)[0m [0;1m SELECT name
|
422
|
+
FROM sqlite_master
|
423
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
424
|
+
[0m
|
425
|
+
[4;35;1mSQL (0.000238)[0m [0mselect sqlite_version(*)[0m
|
426
|
+
[4;36;1mSQL (0.000315)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
427
|
+
[4;35;1mSQL (0.000224)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
428
|
+
[4;36;1mSQL (0.000302)[0m [0;1m SELECT name
|
429
|
+
FROM sqlite_master
|
430
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
431
|
+
[0m
|
432
|
+
[4;35;1mSQL (0.000163)[0m [0mSELECT version FROM schema_migrations[0m
|
433
|
+
Migrating to CreateUsers (1)
|
434
|
+
[4;36;1mSQL (0.000094)[0m [0;1mSELECT version FROM schema_migrations[0m
|
435
|
+
[4;35;1mSQL (0.000395)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
436
|
+
[4;36;1mSQL (0.000145)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
437
|
+
[4;36;1mSQL (0.000464)[0m [0;1m SELECT name
|
438
|
+
FROM sqlite_master
|
439
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
440
|
+
[0m
|
441
|
+
[4;35;1mSQL (0.000258)[0m [0mselect sqlite_version(*)[0m
|
442
|
+
[4;36;1mSQL (0.000309)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
443
|
+
[4;35;1mSQL (0.000223)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
444
|
+
[4;36;1mSQL (0.000301)[0m [0;1m SELECT name
|
445
|
+
FROM sqlite_master
|
446
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
447
|
+
[0m
|
448
|
+
[4;35;1mSQL (0.000168)[0m [0mSELECT version FROM schema_migrations[0m
|
449
|
+
Migrating to CreateUsers (1)
|
450
|
+
[4;36;1mSQL (0.000114)[0m [0;1mSELECT version FROM schema_migrations[0m
|
451
|
+
[4;35;1mSQL (0.000440)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
452
|
+
[4;36;1mSQL (0.000140)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
453
|
+
[4;36;1mSQL (0.000466)[0m [0;1m SELECT name
|
454
|
+
FROM sqlite_master
|
455
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
456
|
+
[0m
|
457
|
+
[4;35;1mSQL (0.000257)[0m [0mselect sqlite_version(*)[0m
|
458
|
+
[4;36;1mSQL (0.000309)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
459
|
+
[4;35;1mSQL (0.000222)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
460
|
+
[4;36;1mSQL (0.000233)[0m [0;1m SELECT name
|
461
|
+
FROM sqlite_master
|
462
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
463
|
+
[0m
|
464
|
+
[4;35;1mSQL (0.000230)[0m [0mSELECT version FROM schema_migrations[0m
|
465
|
+
Migrating to CreateUsers (1)
|
466
|
+
[4;36;1mSQL (0.000109)[0m [0;1mSELECT version FROM schema_migrations[0m
|
467
|
+
[4;35;1mSQL (0.000387)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
468
|
+
[4;36;1mSQL (0.000122)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
469
|
+
[4;36;1mSQL (0.000454)[0m [0;1m SELECT name
|
470
|
+
FROM sqlite_master
|
471
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
472
|
+
[0m
|
473
|
+
[4;35;1mSQL (0.000224)[0m [0mselect sqlite_version(*)[0m
|
474
|
+
[4;36;1mSQL (0.000307)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
475
|
+
[4;35;1mSQL (0.000221)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
476
|
+
[4;36;1mSQL (0.000207)[0m [0;1m SELECT name
|
477
|
+
FROM sqlite_master
|
478
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
479
|
+
[0m
|
480
|
+
[4;35;1mSQL (0.000135)[0m [0mSELECT version FROM schema_migrations[0m
|
481
|
+
Migrating to CreateUsers (1)
|
482
|
+
[4;36;1mSQL (0.000093)[0m [0;1mSELECT version FROM schema_migrations[0m
|
483
|
+
[4;35;1mSQL (0.000383)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
484
|
+
[4;36;1mSQL (0.000124)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
485
|
+
[4;36;1mSQL (0.000485)[0m [0;1m SELECT name
|
486
|
+
FROM sqlite_master
|
487
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
488
|
+
[0m
|
489
|
+
[4;35;1mSQL (0.000234)[0m [0mselect sqlite_version(*)[0m
|
490
|
+
[4;36;1mSQL (0.000312)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
491
|
+
[4;35;1mSQL (0.000222)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
492
|
+
[4;36;1mSQL (0.000210)[0m [0;1m SELECT name
|
493
|
+
FROM sqlite_master
|
494
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
495
|
+
[0m
|
496
|
+
[4;35;1mSQL (0.000144)[0m [0mSELECT version FROM schema_migrations[0m
|
497
|
+
Migrating to CreateUsers (1)
|
498
|
+
[4;36;1mSQL (0.000094)[0m [0;1mSELECT version FROM schema_migrations[0m
|
499
|
+
[4;35;1mSQL (0.000404)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
500
|
+
[4;36;1mSQL (0.000137)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
501
|
+
[4;36;1mSQL (0.000458)[0m [0;1m SELECT name
|
502
|
+
FROM sqlite_master
|
503
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
504
|
+
[0m
|
505
|
+
[4;35;1mSQL (0.000236)[0m [0mselect sqlite_version(*)[0m
|
506
|
+
[4;36;1mSQL (0.000311)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
507
|
+
[4;35;1mSQL (0.000221)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
508
|
+
[4;36;1mSQL (0.000215)[0m [0;1m SELECT name
|
509
|
+
FROM sqlite_master
|
510
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
511
|
+
[0m
|
512
|
+
[4;35;1mSQL (0.000131)[0m [0mSELECT version FROM schema_migrations[0m
|
513
|
+
Migrating to CreateUsers (1)
|
514
|
+
[4;36;1mSQL (0.000094)[0m [0;1mSELECT version FROM schema_migrations[0m
|
515
|
+
[4;35;1mSQL (0.000377)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
516
|
+
[4;36;1mSQL (0.000124)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
517
|
+
[4;36;1mSQL (0.000458)[0m [0;1m SELECT name
|
518
|
+
FROM sqlite_master
|
519
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
520
|
+
[0m
|
521
|
+
[4;35;1mSQL (0.000259)[0m [0mselect sqlite_version(*)[0m
|
522
|
+
[4;36;1mSQL (0.000386)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
523
|
+
[4;35;1mSQL (0.000230)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
524
|
+
[4;36;1mSQL (0.001433)[0m [0;1m SELECT name
|
525
|
+
FROM sqlite_master
|
526
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
527
|
+
[0m
|
528
|
+
[4;35;1mSQL (0.000158)[0m [0mSELECT version FROM schema_migrations[0m
|
529
|
+
Migrating to CreateUsers (1)
|
530
|
+
[4;36;1mSQL (0.000113)[0m [0;1mSELECT version FROM schema_migrations[0m
|
531
|
+
[4;35;1mSQL (0.000410)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
532
|
+
[4;36;1mSQL (0.000132)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
533
|
+
[4;36;1mSQL (0.000465)[0m [0;1m SELECT name
|
534
|
+
FROM sqlite_master
|
535
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
536
|
+
[0m
|
537
|
+
[4;35;1mSQL (0.000248)[0m [0mselect sqlite_version(*)[0m
|
538
|
+
[4;36;1mSQL (0.000323)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
539
|
+
[4;35;1mSQL (0.000225)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
540
|
+
[4;36;1mSQL (0.000221)[0m [0;1m SELECT name
|
541
|
+
FROM sqlite_master
|
542
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
543
|
+
[0m
|
544
|
+
[4;35;1mSQL (0.000174)[0m [0mSELECT version FROM schema_migrations[0m
|
545
|
+
Migrating to CreateUsers (1)
|
546
|
+
[4;36;1mSQL (0.000098)[0m [0;1mSELECT version FROM schema_migrations[0m
|
547
|
+
[4;35;1mSQL (0.000397)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
548
|
+
[4;36;1mSQL (0.000126)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
549
|
+
[4;36;1mSQL (0.000453)[0m [0;1m SELECT name
|
550
|
+
FROM sqlite_master
|
551
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
552
|
+
[0m
|
553
|
+
[4;35;1mSQL (0.000231)[0m [0mselect sqlite_version(*)[0m
|
554
|
+
[4;36;1mSQL (0.000310)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
555
|
+
[4;35;1mSQL (0.000223)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
556
|
+
[4;36;1mSQL (0.000210)[0m [0;1m SELECT name
|
557
|
+
FROM sqlite_master
|
558
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
559
|
+
[0m
|
560
|
+
[4;35;1mSQL (0.000137)[0m [0mSELECT version FROM schema_migrations[0m
|
561
|
+
Migrating to CreateUsers (1)
|
562
|
+
[4;36;1mSQL (0.000094)[0m [0;1mSELECT version FROM schema_migrations[0m
|
563
|
+
[4;35;1mSQL (0.000392)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
564
|
+
[4;36;1mSQL (0.000135)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
565
|
+
[4;36;1mSQL (0.000406)[0m [0;1m SELECT name
|
566
|
+
FROM sqlite_master
|
567
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
568
|
+
[0m
|
569
|
+
[4;35;1mSQL (0.000263)[0m [0mselect sqlite_version(*)[0m
|
570
|
+
[4;36;1mSQL (0.000310)[0m [0;1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
571
|
+
[4;35;1mSQL (0.000225)[0m [0mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
572
|
+
[4;36;1mSQL (0.000218)[0m [0;1m SELECT name
|
573
|
+
FROM sqlite_master
|
574
|
+
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
|
575
|
+
[0m
|
576
|
+
[4;35;1mSQL (0.000158)[0m [0mSELECT version FROM schema_migrations[0m
|
577
|
+
Migrating to CreateUsers (1)
|
578
|
+
[4;36;1mSQL (0.000098)[0m [0;1mSELECT version FROM schema_migrations[0m
|
579
|
+
[4;35;1mSQL (0.000437)[0m [0mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "login" varchar(12) DEFAULT NULL NULL, "password" varchar(16) DEFAULT NULL NULL, "biography" text DEFAULT NULL NULL) [0m
|
580
|
+
[4;36;1mSQL (0.000131)[0m [0;1mINSERT INTO schema_migrations (version) VALUES ('1')[0m
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class FormHelperWithoutConstraintsTest < Test::Unit::TestCase
|
4
|
+
include ActionView::Helpers::TagHelper
|
5
|
+
include ActionView::Helpers::FormHelper
|
6
|
+
|
7
|
+
def setup
|
8
|
+
@user = User.new
|
9
|
+
end
|
10
|
+
|
11
|
+
def test_should_not_add_maxlength_for_text_field
|
12
|
+
assert_equal '<input id="user_biography" name="user[biography]" size="30" type="text" />', text_field(:user, :biography)
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_should_not_add_maxlength_for_password_field
|
16
|
+
assert_equal '<input id="user_biography" name="user[biography]" size="30" type="password" />', password_field(:user, :biography)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
class FormHelperWithValidationConstraintsTest < Test::Unit::TestCase
|
21
|
+
include ActionView::Helpers::TagHelper
|
22
|
+
include ActionView::Helpers::FormHelper
|
23
|
+
|
24
|
+
def setup
|
25
|
+
User.validates_length_of :biography, :maximum => 120
|
26
|
+
User.validates_length_of :password, :maximum => 14
|
27
|
+
|
28
|
+
@user = User.new
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_should_not_add_maxlength_for_text_area
|
32
|
+
assert_equal '<textarea cols="40" id="user_biography" name="user[biography]" rows="20"></textarea>', text_area(:user, :biography)
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_should_not_add_maxlength_for_hidden_field
|
36
|
+
assert_equal '<input id="user_password" name="user[password]" type="hidden" />', hidden_field(:user, :password)
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_should_add_maxlength_for_password_field
|
40
|
+
assert_equal '<input id="user_password" maxlength="14" name="user[password]" size="30" type="password" />', password_field(:user, :password)
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_should_add_maxlength_for_text_field
|
44
|
+
assert_equal '<input id="user_biography" maxlength="120" name="user[biography]" size="30" type="text" />', text_field(:user, :biography)
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_should_allow_maxlength_to_be_overridden
|
48
|
+
assert_equal '<input id="user_biography" maxlength="100" name="user[biography]" size="100" type="text" />', text_field(:user, :biography, :maxlength => 100)
|
49
|
+
end
|
50
|
+
|
51
|
+
def teardown
|
52
|
+
User.class_eval do
|
53
|
+
ActiveRecord::Validations::VALIDATIONS.each do |validation|
|
54
|
+
instance_variable_set("@#{validation}_callbacks", nil)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
User.smart_length_constraints.clear
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
class FormHelperWithColumnConstraintsTest < Test::Unit::TestCase
|
63
|
+
include ActionView::Helpers::TagHelper
|
64
|
+
include ActionView::Helpers::FormHelper
|
65
|
+
|
66
|
+
def setup
|
67
|
+
@user = User.new
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_should_not_add_maxlength_for_text_area
|
71
|
+
assert_equal '<textarea cols="40" id="user_login" name="user[login]" rows="20"></textarea>', text_area(:user, :login)
|
72
|
+
end
|
73
|
+
|
74
|
+
def test_should_not_add_maxlength_for_hidden_field
|
75
|
+
assert_equal '<input id="user_password" name="user[password]" type="hidden" />', hidden_field(:user, :password)
|
76
|
+
end
|
77
|
+
|
78
|
+
def test_should_add_maxlength_for_password_field
|
79
|
+
assert_equal '<input id="user_password" maxlength="16" name="user[password]" size="30" type="password" />', password_field(:user, :password)
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_should_add_maxlength_for_text_field
|
83
|
+
assert_equal '<input id="user_login" maxlength="12" name="user[login]" size="30" type="text" />', text_field(:user, :login)
|
84
|
+
end
|
85
|
+
|
86
|
+
def test_should_allow_maxlength_to_be_overridden
|
87
|
+
assert_equal '<input id="user_login" maxlength="100" name="user[login]" size="100" type="text" />', text_field(:user, :login, :maxlength => 100)
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class ModelWithoutLengthValidationsTest < Test::Unit::TestCase
|
4
|
+
def test_should_not_have_any_constraints
|
5
|
+
assert User.smart_length_constraints.empty?
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
class ModelWithLengthValidationsTest < Test::Unit::TestCase
|
10
|
+
def test_should_not_track_constraint_for_minimum
|
11
|
+
User.validates_length_of :name, :minimum => 1
|
12
|
+
assert_nil User.smart_length_constraints['name']
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_should_track_constraint_for_within
|
16
|
+
User.validates_length_of :name, :within => 1..10
|
17
|
+
assert_equal 10, User.smart_length_constraints['name']
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_should_track_constraint_for_in
|
21
|
+
User.validates_length_of :name, :in => 1..10
|
22
|
+
assert_equal 10, User.smart_length_constraints['name']
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_should_track_constraint_for_maximum
|
26
|
+
User.validates_length_of :name, :maximum => 10
|
27
|
+
assert_equal 10, User.smart_length_constraints['name']
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_should_track_validation_for_is
|
31
|
+
User.validates_length_of :name, :is => 10
|
32
|
+
assert_equal 10, User.smart_length_constraints['name']
|
33
|
+
end
|
34
|
+
|
35
|
+
def teardown
|
36
|
+
User.class_eval do
|
37
|
+
ActiveRecord::Validations::VALIDATIONS.each do |validation|
|
38
|
+
instance_variable_set("@#{validation}_callbacks", nil)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
User.smart_length_constraints.clear
|
43
|
+
end
|
44
|
+
end
|
metadata
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: smart_field_constraints
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Aaron Pfeifer
|
8
|
+
autorequire: smart_field_constraints
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-05-05 00:00:00 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email: aaron@pluginaweek.org
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files: []
|
23
|
+
|
24
|
+
files:
|
25
|
+
- lib/smart_field_constraints
|
26
|
+
- lib/smart_field_constraints/extensions
|
27
|
+
- lib/smart_field_constraints/extensions/form_helper.rb
|
28
|
+
- lib/smart_field_constraints/extensions/validations.rb
|
29
|
+
- lib/smart_field_constraints.rb
|
30
|
+
- test/app_root
|
31
|
+
- test/app_root/log
|
32
|
+
- test/app_root/log/in_memory.log
|
33
|
+
- test/app_root/db
|
34
|
+
- test/app_root/db/migrate
|
35
|
+
- test/app_root/db/migrate/001_create_users.rb
|
36
|
+
- test/app_root/app
|
37
|
+
- test/app_root/app/models
|
38
|
+
- test/app_root/app/models/user.rb
|
39
|
+
- test/test_helper.rb
|
40
|
+
- test/unit
|
41
|
+
- test/unit/form_helper_test.rb
|
42
|
+
- test/unit/validations_test.rb
|
43
|
+
- CHANGELOG
|
44
|
+
- init.rb
|
45
|
+
- LICENSE
|
46
|
+
- Rakefile
|
47
|
+
- README
|
48
|
+
has_rdoc: true
|
49
|
+
homepage: http://www.pluginaweek.org
|
50
|
+
post_install_message:
|
51
|
+
rdoc_options: []
|
52
|
+
|
53
|
+
require_paths:
|
54
|
+
- lib
|
55
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: "0"
|
60
|
+
version:
|
61
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: "0"
|
66
|
+
version:
|
67
|
+
requirements: []
|
68
|
+
|
69
|
+
rubyforge_project:
|
70
|
+
rubygems_version: 1.1.0
|
71
|
+
signing_key:
|
72
|
+
specification_version: 2
|
73
|
+
summary: Intelligently applies a maxlength attribute for text fields based on column constraints and validations
|
74
|
+
test_files:
|
75
|
+
- test/unit/form_helper_test.rb
|
76
|
+
- test/unit/validations_test.rb
|