spud_inquiries 0.9.5 → 1.0.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/contacts_controller.rb +0 -2
- data/app/controllers/spud/admin/inquiry_forms_controller.rb +10 -6
- data/app/controllers/spud/inquiries/sitemaps_controller.rb +0 -1
- data/app/models/spud_inquiry.rb +1 -1
- data/app/models/spud_inquiry_field.rb +1 -1
- data/app/models/spud_inquiry_form.rb +19 -2
- data/app/models/spud_inquiry_form_field.rb +2 -2
- data/app/views/spud/admin/inquiries/show.html.erb +11 -6
- data/config/routes.rb +2 -3
- data/lib/spud_inquiries/version.rb +1 -1
- data/spec/dummy/config/environments/test.rb +1 -5
- data/spec/dummy/db/schema.rb +44 -40
- data/spec/dummy/log/development.log +66 -0
- data/spec/dummy/log/test.log +3487 -0
- data/spec/spec_helper.rb +1 -1
- metadata +27 -28
- data/app/observers/inquiry_sweeper.rb +0 -50
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5efb96f2c6a755028ac4235afbc55ddb4109b8aa
|
|
4
|
+
data.tar.gz: 979f7753f991196c3008507727b7191495a28eb8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8acbaac50154d828a60e505723a91f6a46a9fcd966270e062517fa618a40352be4bacbffbc37941512a8961979daa6566eebd5e41651dcc303cad4c1a5654db4
|
|
7
|
+
data.tar.gz: d38aea2e196a83a643476159a465356e0b60a61c43fee4c792e8faa37174bcf19de59ae9e7b6391c8b88618a858097a39b9cb3fcf6262f79e5f7d07a0995fa03
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
class ContactsController < ApplicationController
|
|
2
|
-
caches_action :show,:if => Proc.new { |c| Spud::Inquiries.enable_action_caching }
|
|
3
|
-
caches_action :thankyou,:if => Proc.new { |c| Spud::Inquiries.enable_action_caching }
|
|
4
2
|
skip_before_filter :verify_authenticity_token
|
|
5
3
|
layout Spud::Inquiries.base_layout
|
|
6
4
|
respond_to :html,:js
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
class Spud::Admin::InquiryFormsController < Spud::Admin::ApplicationController
|
|
2
|
-
layout 'spud/admin/detail'
|
|
3
2
|
belongs_to_spud_app :inquiries, :title => "Inquiry Forms"
|
|
4
|
-
|
|
3
|
+
layout 'spud/admin/detail'
|
|
4
|
+
before_filter :load_form,:only => [:edit,:update,:show,:destroy]
|
|
5
|
+
|
|
5
6
|
add_breadcrumb "Inquiries", :spud_admin_inquiries_path
|
|
6
7
|
add_breadcrumb "Forms", :spud_admin_inquiry_forms_path
|
|
7
8
|
add_breadcrumb "New", '',:only => [:new, :create]
|
|
8
9
|
add_breadcrumb "Edit", '',:only => [:edit, :update]
|
|
9
|
-
before_filter :load_form,:only => [:edit,:update,:show,:destroy]
|
|
10
|
-
def index
|
|
11
10
|
|
|
11
|
+
def index
|
|
12
12
|
@inquiry_forms = SpudInquiryForm.order(:name).paginate :page => params[:page]
|
|
13
13
|
respond_with @inquiry_forms
|
|
14
14
|
end
|
|
@@ -19,7 +19,7 @@ class Spud::Admin::InquiryFormsController < Spud::Admin::ApplicationController
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def create
|
|
22
|
-
@inquiry_form = SpudInquiryForm.new(
|
|
22
|
+
@inquiry_form = SpudInquiryForm.new(inquiry_form_params)
|
|
23
23
|
flash[:notice] = "Form saved successfully!" if @inquiry_form.save
|
|
24
24
|
|
|
25
25
|
respond_with @inquiry_form,:location => spud_admin_inquiry_forms_url
|
|
@@ -30,7 +30,7 @@ class Spud::Admin::InquiryFormsController < Spud::Admin::ApplicationController
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def update
|
|
33
|
-
flash[:notice] = "Form saved successfully!" if @inquiry_form.update_attributes(
|
|
33
|
+
flash[:notice] = "Form saved successfully!" if @inquiry_form.update_attributes(inquiry_form_params)
|
|
34
34
|
if Spud::Inquiries.enable_action_caching
|
|
35
35
|
Rails.cache.clear
|
|
36
36
|
end
|
|
@@ -52,4 +52,8 @@ private
|
|
|
52
52
|
redirect_to spud_admin_inquiry_forms_url() and return
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
|
+
|
|
56
|
+
def inquiry_form_params
|
|
57
|
+
params.require(:spud_inquiry_form).permit(:name,:url_name,:recipients,:content,:subject,{:spud_inquiry_form_fields_attributes => [:id,:name,:options,:default_value,:field_type,:spud_inquiry_form_id,:field_order,:required, :placeholder, :class_name,:_destroy]}, :created_at, :updated_at, :thank_you_content, :submit_title)
|
|
58
|
+
end
|
|
55
59
|
end
|
data/app/models/spud_inquiry.rb
CHANGED
|
@@ -3,7 +3,7 @@ class SpudInquiry < ActiveRecord::Base
|
|
|
3
3
|
has_many :spud_inquiry_fields, :dependent => :destroy
|
|
4
4
|
belongs_to :spud_inquiry_form
|
|
5
5
|
accepts_nested_attributes_for :spud_inquiry_fields, :reject_if => lambda { |a| a[:name].blank? }
|
|
6
|
-
attr_accessible :spud_inquiry_form_id,:spud_inquiry_fields
|
|
6
|
+
# attr_accessible :spud_inquiry_form_id,:spud_inquiry_fields
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def email
|
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
class SpudInquiryForm < ActiveRecord::Base
|
|
2
2
|
has_many :spud_inquiries, :dependent => :nullify
|
|
3
|
-
has_many :spud_inquiry_form_fields,:dependent => :destroy
|
|
3
|
+
has_many :spud_inquiry_form_fields, -> { order :field_order},:dependent => :destroy
|
|
4
4
|
|
|
5
5
|
accepts_nested_attributes_for :spud_inquiry_form_fields, :reject_if => lambda { |a| a[:name].blank? }, :allow_destroy => true
|
|
6
6
|
|
|
7
7
|
validates :name,:presence => true,:uniqueness => true
|
|
8
8
|
validates :url_name,:presence => true, :uniqueness => true
|
|
9
9
|
before_validation :generate_url_name
|
|
10
|
-
|
|
10
|
+
after_save :expire_cache
|
|
11
|
+
after_destroy :expire_cache
|
|
12
|
+
# attr_accessible :name,:url_name,:recipients,:content,:subject,:spud_inquiry_form_fields_attributes, :created_at, :updated_at, :thank_you_content, :submit_title
|
|
11
13
|
|
|
12
14
|
def generate_url_name
|
|
13
15
|
if !self.name.blank?
|
|
14
16
|
self.url_name = self.name.gsub(/[^a-zA-Z0-9\ ]/," ").gsub(/\ \ +/," ").gsub(/\ /,"-").downcase
|
|
15
17
|
end
|
|
16
18
|
end
|
|
19
|
+
|
|
20
|
+
def expire_cache
|
|
21
|
+
if !defined?(SpudPageLiquidTag)
|
|
22
|
+
return
|
|
23
|
+
end
|
|
24
|
+
# Now Time to Update Parent Entries
|
|
25
|
+
old_name = self.name_was
|
|
26
|
+
values = [self.name]
|
|
27
|
+
values << old_name if !old_name.blank?
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
SpudPageLiquidTag.where(:tag_name => "inquiry",:value => values).includes(:attachment).each do |tag|
|
|
31
|
+
partial = tag.touch
|
|
32
|
+
end
|
|
33
|
+
end
|
|
17
34
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
class SpudInquiryFormField < ActiveRecord::Base
|
|
2
|
-
belongs_to :spud_inquiry_form
|
|
2
|
+
belongs_to :spud_inquiry_form, :touch => true
|
|
3
3
|
validates :name,:presence => true
|
|
4
4
|
validates :field_type,:presence => true
|
|
5
5
|
# validates :spud_inquiry_form_id, :presence => true
|
|
6
|
-
attr_accessible :name,:options,:default_value,:field_type,:spud_inquiry_form_id,:field_order,:required, :placeholder, :class_name
|
|
6
|
+
# attr_accessible :name,:options,:default_value,:field_type,:spud_inquiry_form_id,:field_order,:required, :placeholder, :class_name
|
|
7
7
|
|
|
8
8
|
before_save :update_field_name
|
|
9
9
|
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
<%=content_for :detail do%>
|
|
2
|
-
<h3>Form: <%=@inquiry.spud_inquiry_form.blank? ? "No Form" : @inquiry.spud_inquiry_form.name
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<h3>Form: <%=@inquiry.spud_inquiry_form.blank? ? "No Form" : @inquiry.spud_inquiry_form.name%></h3>
|
|
3
|
+
<dl class="dl-horizontal">
|
|
4
|
+
<dt>From</dt>
|
|
5
|
+
<dd><%=link_to @inquiry.email,"mailto:#{@inquiry.email}"%></dd>
|
|
6
|
+
<%@inquiry.spud_inquiry_fields.each do |field|%>
|
|
7
|
+
<dt><%=field.name%></dt>
|
|
8
|
+
<dd>
|
|
6
9
|
<%=field.value%>
|
|
7
|
-
</
|
|
10
|
+
</dd>
|
|
8
11
|
<%end%>
|
|
9
|
-
|
|
12
|
+
</dl>
|
|
13
|
+
|
|
14
|
+
<%end%>
|
data/config/routes.rb
CHANGED
|
@@ -9,9 +9,8 @@ Rails.application.routes.draw do
|
|
|
9
9
|
end
|
|
10
10
|
end
|
|
11
11
|
post "/contact/inquire" => "contacts#inquire"
|
|
12
|
-
|
|
12
|
+
get "/contact/thankyou" => "contacts#thankyou"
|
|
13
13
|
if Spud::Inquiries.enable_routes
|
|
14
|
-
|
|
15
|
-
match "/contact/:id" => "contacts#show", :as => :contact
|
|
14
|
+
get "/contact(/:id)" => "contacts#show", :as => :contact
|
|
16
15
|
end
|
|
17
16
|
end
|
|
@@ -11,8 +11,7 @@ Dummy::Application.configure do
|
|
|
11
11
|
config.serve_static_assets = true
|
|
12
12
|
config.static_cache_control = "public, max-age=3600"
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
config.whiny_nils = true
|
|
14
|
+
config.eager_load = false
|
|
16
15
|
|
|
17
16
|
# Show full error reports and disable caching
|
|
18
17
|
config.consider_all_requests_local = true
|
|
@@ -29,9 +28,6 @@ Dummy::Application.configure do
|
|
|
29
28
|
# ActionMailer::Base.deliveries array.
|
|
30
29
|
config.action_mailer.delivery_method = :test
|
|
31
30
|
|
|
32
|
-
# Raise exception on mass assignment protection for Active Record models
|
|
33
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
|
34
|
-
|
|
35
31
|
# Print deprecation notices to the stderr
|
|
36
32
|
config.active_support.deprecation = :stderr
|
|
37
33
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
|
@@ -9,102 +9,106 @@
|
|
|
9
9
|
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
|
10
10
|
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
|
11
11
|
#
|
|
12
|
-
# It's strongly recommended
|
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
|
13
13
|
|
|
14
|
-
ActiveRecord::Schema.define(:
|
|
14
|
+
ActiveRecord::Schema.define(version: 20131204163221) do
|
|
15
15
|
|
|
16
|
-
create_table "spud_admin_permissions", :
|
|
16
|
+
create_table "spud_admin_permissions", force: true do |t|
|
|
17
17
|
t.integer "user_id"
|
|
18
18
|
t.string "name"
|
|
19
19
|
t.boolean "access"
|
|
20
|
-
t.datetime "created_at", :
|
|
21
|
-
t.datetime "updated_at", :
|
|
20
|
+
t.datetime "created_at", null: false
|
|
21
|
+
t.datetime "updated_at", null: false
|
|
22
22
|
t.string "scope"
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
create_table "spud_inquiries", :
|
|
25
|
+
create_table "spud_inquiries", force: true do |t|
|
|
26
26
|
t.string "email"
|
|
27
|
-
t.datetime "created_at",
|
|
28
|
-
t.datetime "updated_at",
|
|
27
|
+
t.datetime "created_at", null: false
|
|
28
|
+
t.datetime "updated_at", null: false
|
|
29
29
|
t.integer "spud_inquiry_form_id"
|
|
30
30
|
t.text "recipients"
|
|
31
31
|
t.string "subject"
|
|
32
|
-
t.boolean "marked_as_read", :
|
|
32
|
+
t.boolean "marked_as_read", default: false
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
add_index "spud_inquiries", ["marked_as_read"], :
|
|
36
|
-
add_index "spud_inquiries", ["spud_inquiry_form_id"], :
|
|
35
|
+
add_index "spud_inquiries", ["marked_as_read"], name: "idx_inquiry_read", using: :btree
|
|
36
|
+
add_index "spud_inquiries", ["spud_inquiry_form_id"], name: "idx_inquiry_form", using: :btree
|
|
37
37
|
|
|
38
|
-
create_table "spud_inquiry_fields", :
|
|
38
|
+
create_table "spud_inquiry_fields", force: true do |t|
|
|
39
39
|
t.string "name"
|
|
40
40
|
t.text "value"
|
|
41
41
|
t.integer "spud_inquiry_id"
|
|
42
|
-
t.datetime "created_at", :
|
|
43
|
-
t.datetime "updated_at", :
|
|
42
|
+
t.datetime "created_at", null: false
|
|
43
|
+
t.datetime "updated_at", null: false
|
|
44
|
+
t.string "field_name"
|
|
44
45
|
end
|
|
45
46
|
|
|
46
|
-
add_index "spud_inquiry_fields", ["spud_inquiry_id"], :
|
|
47
|
+
add_index "spud_inquiry_fields", ["spud_inquiry_id"], name: "inquiry_field_parent_id", using: :btree
|
|
47
48
|
|
|
48
|
-
create_table "spud_inquiry_form_fields", :
|
|
49
|
+
create_table "spud_inquiry_form_fields", force: true do |t|
|
|
49
50
|
t.integer "spud_inquiry_form_id"
|
|
50
51
|
t.string "field_type"
|
|
51
52
|
t.string "name"
|
|
52
53
|
t.text "options"
|
|
53
54
|
t.string "default_value"
|
|
54
|
-
t.datetime "created_at", :
|
|
55
|
-
t.datetime "updated_at", :
|
|
55
|
+
t.datetime "created_at", null: false
|
|
56
|
+
t.datetime "updated_at", null: false
|
|
56
57
|
t.integer "field_order"
|
|
57
58
|
t.boolean "required"
|
|
58
59
|
t.string "placeholder"
|
|
60
|
+
t.string "field_name"
|
|
61
|
+
t.string "class_name"
|
|
59
62
|
end
|
|
60
63
|
|
|
61
|
-
add_index "spud_inquiry_form_fields", ["field_order"], :
|
|
64
|
+
add_index "spud_inquiry_form_fields", ["field_order"], name: "form_field_order", using: :btree
|
|
62
65
|
|
|
63
|
-
create_table "spud_inquiry_forms", :
|
|
66
|
+
create_table "spud_inquiry_forms", force: true do |t|
|
|
64
67
|
t.string "name"
|
|
65
68
|
t.text "content"
|
|
66
|
-
t.datetime "created_at", :
|
|
67
|
-
t.datetime "updated_at", :
|
|
69
|
+
t.datetime "created_at", null: false
|
|
70
|
+
t.datetime "updated_at", null: false
|
|
68
71
|
t.text "recipients"
|
|
69
72
|
t.string "subject"
|
|
70
73
|
t.string "url_name"
|
|
71
74
|
t.text "thank_you_content"
|
|
75
|
+
t.string "submit_title"
|
|
72
76
|
end
|
|
73
77
|
|
|
74
|
-
add_index "spud_inquiry_forms", ["url_name"], :
|
|
78
|
+
add_index "spud_inquiry_forms", ["url_name"], name: "idx_form_url_name", using: :btree
|
|
75
79
|
|
|
76
|
-
create_table "spud_user_settings", :
|
|
80
|
+
create_table "spud_user_settings", force: true do |t|
|
|
77
81
|
t.integer "spud_user_id"
|
|
78
82
|
t.string "key"
|
|
79
83
|
t.string "value"
|
|
80
|
-
t.datetime "created_at", :
|
|
81
|
-
t.datetime "updated_at", :
|
|
84
|
+
t.datetime "created_at", null: false
|
|
85
|
+
t.datetime "updated_at", null: false
|
|
82
86
|
end
|
|
83
87
|
|
|
84
|
-
create_table "spud_users", :
|
|
88
|
+
create_table "spud_users", force: true do |t|
|
|
85
89
|
t.string "first_name"
|
|
86
90
|
t.string "last_name"
|
|
87
91
|
t.boolean "super_admin"
|
|
88
|
-
t.string "login",
|
|
89
|
-
t.string "email",
|
|
90
|
-
t.string "crypted_password",
|
|
91
|
-
t.string "password_salt",
|
|
92
|
-
t.string "persistence_token",
|
|
93
|
-
t.string "single_access_token",
|
|
94
|
-
t.string "perishable_token",
|
|
95
|
-
t.integer "login_count", :
|
|
96
|
-
t.integer "failed_login_count", :
|
|
92
|
+
t.string "login", null: false
|
|
93
|
+
t.string "email", null: false
|
|
94
|
+
t.string "crypted_password", null: false
|
|
95
|
+
t.string "password_salt", null: false
|
|
96
|
+
t.string "persistence_token", null: false
|
|
97
|
+
t.string "single_access_token", null: false
|
|
98
|
+
t.string "perishable_token", null: false
|
|
99
|
+
t.integer "login_count", default: 0, null: false
|
|
100
|
+
t.integer "failed_login_count", default: 0, null: false
|
|
97
101
|
t.datetime "last_request_at"
|
|
98
102
|
t.datetime "current_login_at"
|
|
99
103
|
t.datetime "last_login_at"
|
|
100
104
|
t.string "current_login_ip"
|
|
101
105
|
t.string "last_login_ip"
|
|
102
|
-
t.datetime "created_at",
|
|
103
|
-
t.datetime "updated_at",
|
|
106
|
+
t.datetime "created_at", null: false
|
|
107
|
+
t.datetime "updated_at", null: false
|
|
104
108
|
t.string "time_zone"
|
|
105
109
|
end
|
|
106
110
|
|
|
107
|
-
add_index "spud_users", ["email"], :
|
|
108
|
-
add_index "spud_users", ["login"], :
|
|
111
|
+
add_index "spud_users", ["email"], name: "index_spud_users_on_email", using: :btree
|
|
112
|
+
add_index "spud_users", ["login"], name: "index_spud_users_on_login", using: :btree
|
|
109
113
|
|
|
110
114
|
end
|
|
@@ -20,3 +20,69 @@ Migrating to AddThankYouContentToSpudInquiryForm (20121228145215)
|
|
|
20
20
|
[1m[35m (0.3ms)[0m SELECT `schema_migrations`.`version` FROM `schema_migrations`
|
|
21
21
|
Connecting to database specified by database.yml
|
|
22
22
|
Connecting to database specified by database.yml
|
|
23
|
+
[1m[36mActiveRecord::SchemaMigration Load (2.1ms)[0m [1mSELECT `schema_migrations`.* FROM `schema_migrations`[0m
|
|
24
|
+
Migrating to AddPlaceholderToSpudInquiryFormFields (20130627121030)
|
|
25
|
+
[1m[35m (27.3ms)[0m ALTER TABLE `spud_inquiry_form_fields` ADD `placeholder` varchar(255)
|
|
26
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
27
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20130627121030')
|
|
28
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
|
29
|
+
Migrating to AddSubmitTitleToSpudInquiryForm (20131111143656)
|
|
30
|
+
[1m[35m (14.2ms)[0m ALTER TABLE `spud_inquiry_forms` ADD `submit_title` varchar(255)
|
|
31
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
32
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20131111143656')
|
|
33
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
|
34
|
+
Migrating to AddFieldNameToSpudInquiryFormFields (20131111143945)
|
|
35
|
+
[1m[35m (8.3ms)[0m ALTER TABLE `spud_inquiry_form_fields` ADD `field_name` varchar(255)
|
|
36
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
37
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20131111143945')
|
|
38
|
+
[1m[36m (0.6ms)[0m [1mCOMMIT[0m
|
|
39
|
+
Migrating to AddClassNameToSpudInquiryFormFields (20131111144731)
|
|
40
|
+
[1m[35m (8.1ms)[0m ALTER TABLE `spud_inquiry_form_fields` ADD `class_name` varchar(255)
|
|
41
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
42
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20131111144731')
|
|
43
|
+
[1m[36m (0.5ms)[0m [1mCOMMIT[0m
|
|
44
|
+
Migrating to AddFieldNameToSpudInquiryFields (20131204163221)
|
|
45
|
+
[1m[35m (10.9ms)[0m ALTER TABLE `spud_inquiry_fields` ADD `field_name` varchar(255)
|
|
46
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
|
47
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO `schema_migrations` (`version`) VALUES ('20131204163221')
|
|
48
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
|
49
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.3ms)[0m SELECT `schema_migrations`.* FROM `schema_migrations`
|
|
50
|
+
[1m[36m (22.8ms)[0m [1mDROP DATABASE IF EXISTS `spud_inquiries_test`[0m
|
|
51
|
+
[1m[35m (0.4ms)[0m CREATE DATABASE `spud_inquiries_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
|
|
52
|
+
[1m[36m (24.6ms)[0m [1mCREATE TABLE `spud_admin_permissions` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `user_id` int(11), `name` varchar(255), `access` tinyint(1), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `scope` varchar(255)) ENGINE=InnoDB[0m
|
|
53
|
+
[1m[35m (8.4ms)[0m CREATE TABLE `spud_inquiries` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `email` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `spud_inquiry_form_id` int(11), `recipients` text, `subject` varchar(255), `marked_as_read` tinyint(1) DEFAULT 0) ENGINE=InnoDB
|
|
54
|
+
[1m[36m (9.3ms)[0m [1mCREATE INDEX `idx_inquiry_read` USING btree ON `spud_inquiries` (`marked_as_read`) [0m
|
|
55
|
+
[1m[35m (8.7ms)[0m CREATE INDEX `idx_inquiry_form` USING btree ON `spud_inquiries` (`spud_inquiry_form_id`)
|
|
56
|
+
[1m[36m (16.1ms)[0m [1mCREATE TABLE `spud_inquiry_fields` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `value` text, `spud_inquiry_id` int(11), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `field_name` varchar(255)) ENGINE=InnoDB[0m
|
|
57
|
+
[1m[35m (8.1ms)[0m CREATE INDEX `inquiry_field_parent_id` USING btree ON `spud_inquiry_fields` (`spud_inquiry_id`)
|
|
58
|
+
[1m[36m (8.9ms)[0m [1mCREATE TABLE `spud_inquiry_form_fields` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_inquiry_form_id` int(11), `field_type` varchar(255), `name` varchar(255), `options` text, `default_value` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `field_order` int(11), `required` tinyint(1), `placeholder` varchar(255), `field_name` varchar(255), `class_name` varchar(255)) ENGINE=InnoDB[0m
|
|
59
|
+
[1m[35m (10.9ms)[0m CREATE INDEX `form_field_order` USING btree ON `spud_inquiry_form_fields` (`field_order`)
|
|
60
|
+
[1m[36m (6.7ms)[0m [1mCREATE TABLE `spud_inquiry_forms` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `content` text, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `recipients` text, `subject` varchar(255), `url_name` varchar(255), `thank_you_content` text, `submit_title` varchar(255)) ENGINE=InnoDB[0m
|
|
61
|
+
[1m[35m (10.3ms)[0m CREATE INDEX `idx_form_url_name` USING btree ON `spud_inquiry_forms` (`url_name`)
|
|
62
|
+
[1m[36m (7.8ms)[0m [1mCREATE TABLE `spud_user_settings` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `spud_user_id` int(11), `key` varchar(255), `value` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL) ENGINE=InnoDB[0m
|
|
63
|
+
[1m[35m (7.2ms)[0m CREATE TABLE `spud_users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `first_name` varchar(255), `last_name` varchar(255), `super_admin` tinyint(1), `login` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `crypted_password` varchar(255) NOT NULL, `password_salt` varchar(255) NOT NULL, `persistence_token` varchar(255) NOT NULL, `single_access_token` varchar(255) NOT NULL, `perishable_token` varchar(255) NOT NULL, `login_count` int(11) DEFAULT 0 NOT NULL, `failed_login_count` int(11) DEFAULT 0 NOT NULL, `last_request_at` datetime, `current_login_at` datetime, `last_login_at` datetime, `current_login_ip` varchar(255), `last_login_ip` varchar(255), `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, `time_zone` varchar(255)) ENGINE=InnoDB
|
|
64
|
+
[1m[36m (8.5ms)[0m [1mCREATE INDEX `index_spud_users_on_email` USING btree ON `spud_users` (`email`) [0m
|
|
65
|
+
[1m[35m (16.0ms)[0m CREATE INDEX `index_spud_users_on_login` USING btree ON `spud_users` (`login`)
|
|
66
|
+
[1m[36m (6.2ms)[0m [1mCREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB[0m
|
|
67
|
+
[1m[35m (14.2ms)[0m CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
|
|
68
|
+
[1m[36m (0.2ms)[0m [1mSELECT version FROM `schema_migrations`[0m
|
|
69
|
+
[1m[35m (0.6ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20131204163221')
|
|
70
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120610131537')[0m
|
|
71
|
+
[1m[35m (0.6ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120610131538')
|
|
72
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120610131539')[0m
|
|
73
|
+
[1m[35m (0.7ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120610131540')
|
|
74
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120610131541')[0m
|
|
75
|
+
[1m[35m (0.5ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120117133405')
|
|
76
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120117133412')[0m
|
|
77
|
+
[1m[35m (0.5ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120121194439')
|
|
78
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120121194447')[0m
|
|
79
|
+
[1m[35m (0.5ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120122173829')
|
|
80
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120126132407')[0m
|
|
81
|
+
[1m[35m (0.5ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120126132522')
|
|
82
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20120127023335')[0m
|
|
83
|
+
[1m[35m (0.5ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20120413124900')
|
|
84
|
+
[1m[36m (0.4ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20121228145215')[0m
|
|
85
|
+
[1m[35m (0.5ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20130627121030')
|
|
86
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20131111143656')[0m
|
|
87
|
+
[1m[35m (0.5ms)[0m INSERT INTO `schema_migrations` (version) VALUES ('20131111143945')
|
|
88
|
+
[1m[36m (0.5ms)[0m [1mINSERT INTO `schema_migrations` (version) VALUES ('20131111144731')[0m
|