weixin_pam 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +165 -0
- data/Rakefile +37 -0
- data/app/assets/javascripts/jquery-sortable.js +699 -0
- data/app/assets/javascripts/weixin_pam/application.js +30 -0
- data/app/assets/javascripts/weixin_pam/diymenus.js +90 -0
- data/app/assets/javascripts/weixin_pam/public_accounts.js +2 -0
- data/app/assets/javascripts/weixin_pam/user_accounts.js +23 -0
- data/app/assets/stylesheets/weixin_pam/application.scss +31 -0
- data/app/assets/stylesheets/weixin_pam/diymenus.scss +52 -0
- data/app/assets/stylesheets/weixin_pam/jquery-dragable.scss +26 -0
- data/app/assets/stylesheets/weixin_pam/public_accounts.css +4 -0
- data/app/assets/stylesheets/weixin_pam/user_accounts.css +4 -0
- data/app/controllers/weixin_pam/application_controller.rb +4 -0
- data/app/controllers/weixin_pam/diymenus_controller.rb +100 -0
- data/app/controllers/weixin_pam/public_accounts_controller.rb +62 -0
- data/app/controllers/weixin_pam/user_accounts_controller.rb +76 -0
- data/app/decorators/controllers/weixin_rails_middleware/weixin_controller_decorator.rb +31 -0
- data/app/helpers/weixin_pam/application_helper.rb +18 -0
- data/app/helpers/weixin_pam/diymenus_helper.rb +4 -0
- data/app/helpers/weixin_pam/public_accounts_helper.rb +4 -0
- data/app/helpers/weixin_pam/user_accounts_helper.rb +4 -0
- data/app/models/weixin_pam/diymenu.rb +58 -0
- data/app/models/weixin_pam/public_account.rb +87 -0
- data/app/models/weixin_pam/user_account.rb +67 -0
- data/app/views/layouts/weixin_pam/_nav_bar.html.erb +37 -0
- data/app/views/layouts/weixin_pam/application.html.erb +26 -0
- data/app/views/weixin_pam/diymenus/_form.html.erb +18 -0
- data/app/views/weixin_pam/diymenus/edit.html.erb +3 -0
- data/app/views/weixin_pam/diymenus/index.html.slim +32 -0
- data/app/views/weixin_pam/diymenus/new.html.erb +3 -0
- data/app/views/weixin_pam/public_accounts/_form.html.erb +12 -0
- data/app/views/weixin_pam/public_accounts/edit.html.erb +3 -0
- data/app/views/weixin_pam/public_accounts/index.html.erb +30 -0
- data/app/views/weixin_pam/public_accounts/new.html.erb +3 -0
- data/app/views/weixin_pam/public_accounts/show.html.erb +17 -0
- data/app/views/weixin_pam/user_accounts/_form.html.erb +37 -0
- data/app/views/weixin_pam/user_accounts/edit.html.erb +6 -0
- data/app/views/weixin_pam/user_accounts/index.html.slim +25 -0
- data/app/views/weixin_pam/user_accounts/new.html.erb +5 -0
- data/app/views/weixin_pam/user_accounts/show.html.erb +29 -0
- data/config/initializers/simple_form.rb +165 -0
- data/config/initializers/simple_form_bootstrap.rb +149 -0
- data/config/initializers/weixin_rails_middleware.rb +27 -0
- data/config/locales/diymenu.zh-CN.yml +9 -0
- data/config/locales/public_account.zh-CN.yml +16 -0
- data/config/locales/simple_form.en.yml +31 -0
- data/config/locales/user_account.zh-CN.yml +13 -0
- data/config/routes.rb +17 -0
- data/db/migrate/20151211153307_create_weixin_pam_public_accounts.rb +14 -0
- data/db/migrate/20151211153353_create_weixin_pam_user_accounts.rb +19 -0
- data/db/migrate/20151212152624_create_weixin_pam_diymenus.rb +18 -0
- data/db/migrate/20151215140830_add_weixin_secret_key_and_weixin_token_to_public_accounts.rb +13 -0
- data/db/migrate/20151218053505_add_host_to_weixin_pam_public_account.rb +6 -0
- data/lib/tasks/weixin_pam_tasks.rake +4 -0
- data/lib/templates/erb/scaffold/_form.html.erb +13 -0
- data/lib/weixin_pam.rb +3 -0
- data/lib/weixin_pam/api_error.rb +3 -0
- data/lib/weixin_pam/api_error/failed_result.rb +11 -0
- data/lib/weixin_pam/engine.rb +24 -0
- data/lib/weixin_pam/public_account_reply.rb +222 -0
- data/lib/weixin_pam/version.rb +3 -0
- data/test/controllers/weixin_pam/diymenus_controller_test.rb +52 -0
- data/test/controllers/weixin_pam/public_accounts_controller_test.rb +52 -0
- data/test/controllers/weixin_pam/user_accounts_controller_test.rb +52 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +60 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +594 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/fixtures/weixin_pam/diymenus.yml +19 -0
- data/test/fixtures/weixin_pam/public_accounts.yml +17 -0
- data/test/fixtures/weixin_pam/user_accounts.yml +15 -0
- data/test/integration/navigation_test.rb +8 -0
- data/test/models/weixin_pam/diymenu_test.rb +9 -0
- data/test/models/weixin_pam/public_account_test.rb +9 -0
- data/test/models/weixin_pam/user_account_test.rb +9 -0
- data/test/test_helper.rb +21 -0
- data/test/weixin_pam_test.rb +7 -0
- metadata +374 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static file server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_files = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Randomize the order test cases are executed.
|
35
|
+
config.active_support.test_order = :random
|
36
|
+
|
37
|
+
# Print deprecation notices to the stderr.
|
38
|
+
config.active_support.deprecation = :stderr
|
39
|
+
|
40
|
+
# Raises error for missing translations
|
41
|
+
# config.action_view.raise_on_missing_translations = true
|
42
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Version of your assets, change this if you want to expire all your assets.
|
4
|
+
Rails.application.config.assets.version = '1.0'
|
5
|
+
|
6
|
+
# Add additional assets to the asset load path
|
7
|
+
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
+
|
9
|
+
# Precompile additional assets.
|
10
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure the secrets in this file are kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
|
13
|
+
development:
|
14
|
+
secret_key_base: 42e7055f8d4abde21c6d79d571b1e02e386fb8188d0ba1b63e7342403d0f9ec38980288b16884582a6f6bb6bde17ee457fae1e28b95b4ad3b6a5040eda8719d3
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: b91d31af61fe2198a6afbf32573df9252ceb351f828e58753b6333a5ea4be78cc4f5fce3dc12670ad774d4b3935e83da4af51ef5cba261994341558427a3abe4
|
18
|
+
|
19
|
+
# Do not keep production secrets in the repository,
|
20
|
+
# instead read values from the environment.
|
21
|
+
production:
|
22
|
+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
Binary file
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20151215140830) do
|
15
|
+
|
16
|
+
create_table "weixin_pam_diymenus", force: :cascade do |t|
|
17
|
+
t.integer "public_account_id"
|
18
|
+
t.integer "parent_id"
|
19
|
+
t.string "name"
|
20
|
+
t.string "key"
|
21
|
+
t.string "url"
|
22
|
+
t.boolean "is_show"
|
23
|
+
t.integer "sort"
|
24
|
+
t.datetime "created_at", null: false
|
25
|
+
t.datetime "updated_at", null: false
|
26
|
+
end
|
27
|
+
|
28
|
+
add_index "weixin_pam_diymenus", ["parent_id"], name: "index_weixin_pam_diymenus_on_parent_id"
|
29
|
+
add_index "weixin_pam_diymenus", ["public_account_id"], name: "index_weixin_pam_diymenus_on_public_account_id"
|
30
|
+
|
31
|
+
create_table "weixin_pam_public_accounts", force: :cascade do |t|
|
32
|
+
t.string "name"
|
33
|
+
t.string "app_id"
|
34
|
+
t.string "app_secret"
|
35
|
+
t.string "api_url"
|
36
|
+
t.string "api_token"
|
37
|
+
t.boolean "enabled"
|
38
|
+
t.datetime "created_at", null: false
|
39
|
+
t.datetime "updated_at", null: false
|
40
|
+
t.string "weixin_secret_key"
|
41
|
+
t.string "weixin_token"
|
42
|
+
end
|
43
|
+
|
44
|
+
add_index "weixin_pam_public_accounts", ["weixin_secret_key"], name: "index_weixin_pam_public_accounts_on_weixin_secret_key"
|
45
|
+
add_index "weixin_pam_public_accounts", ["weixin_token"], name: "index_weixin_pam_public_accounts_on_weixin_token"
|
46
|
+
|
47
|
+
create_table "weixin_pam_user_accounts", force: :cascade do |t|
|
48
|
+
t.integer "public_account_id"
|
49
|
+
t.string "uid"
|
50
|
+
t.string "nickname"
|
51
|
+
t.string "headshot"
|
52
|
+
t.boolean "subscribed"
|
53
|
+
t.datetime "created_at", null: false
|
54
|
+
t.datetime "updated_at", null: false
|
55
|
+
end
|
56
|
+
|
57
|
+
add_index "weixin_pam_user_accounts", ["public_account_id", "uid"], name: "index_weixin_pam_user_accounts_on_public_account_id_and_uid", unique: true
|
58
|
+
add_index "weixin_pam_user_accounts", ["public_account_id"], name: "index_weixin_pam_user_accounts_on_public_account_id"
|
59
|
+
|
60
|
+
end
|
File without changes
|
@@ -0,0 +1,594 @@
|
|
1
|
+
[1m[36m (0.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
2
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
3
|
+
[1m[36m (0.6ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
4
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
5
|
+
Migrating to CreateWeixinPamPublicAccounts (20151211153307)
|
6
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "weixin_pam_public_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "app_id" varchar, "app_secret" varchar, "api_url" varchar, "api_token" varchar, "enabled" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
8
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20151211153307"]]
|
9
|
+
[1m[35m (0.6ms)[0m commit transaction
|
10
|
+
Migrating to CreateWeixinPamUserAccounts (20151211153353)
|
11
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
12
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "weixin_pam_user_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "public_account_id" integer, "uid" varchar, "nickname" varchar, "headshot" varchar, "subscribed" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
13
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_weixin_pam_user_accounts_on_public_account_id" ON "weixin_pam_user_accounts" ("public_account_id")[0m
|
14
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151211153353"]]
|
15
|
+
[1m[36m (0.5ms)[0m [1mcommit transaction[0m
|
16
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
17
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
18
|
+
FROM sqlite_master
|
19
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
20
|
+
UNION ALL
|
21
|
+
SELECT sql
|
22
|
+
FROM sqlite_temp_master
|
23
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
24
|
+
[0m
|
25
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
26
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
27
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
28
|
+
FROM sqlite_master
|
29
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
30
|
+
UNION ALL
|
31
|
+
SELECT sql
|
32
|
+
FROM sqlite_temp_master
|
33
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
34
|
+
[0m
|
35
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
36
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
37
|
+
FROM sqlite_master
|
38
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
39
|
+
UNION ALL
|
40
|
+
SELECT sql
|
41
|
+
FROM sqlite_temp_master
|
42
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
43
|
+
|
44
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
45
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
46
|
+
FROM sqlite_master
|
47
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
48
|
+
UNION ALL
|
49
|
+
SELECT sql
|
50
|
+
FROM sqlite_temp_master
|
51
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
52
|
+
|
53
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
54
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
55
|
+
FROM sqlite_master
|
56
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
57
|
+
UNION ALL
|
58
|
+
SELECT sql
|
59
|
+
FROM sqlite_temp_master
|
60
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
61
|
+
|
62
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
63
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
64
|
+
FROM sqlite_master
|
65
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
66
|
+
UNION ALL
|
67
|
+
SELECT sql
|
68
|
+
FROM sqlite_temp_master
|
69
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
70
|
+
|
71
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
72
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
73
|
+
FROM sqlite_master
|
74
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
75
|
+
UNION ALL
|
76
|
+
SELECT sql
|
77
|
+
FROM sqlite_temp_master
|
78
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
79
|
+
|
80
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
81
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
82
|
+
Migrating to CreateWeixinPamUserAccounts (20151211153353)
|
83
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
84
|
+
[1m[35m (0.4ms)[0m DROP TABLE "weixin_pam_user_accounts"
|
85
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ?[0m [["version", "20151211153353"]]
|
86
|
+
[1m[35m (0.5ms)[0m commit transaction
|
87
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
88
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.0ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
89
|
+
Migrating to CreateWeixinPamUserAccounts (20151211153353)
|
90
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
91
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "weixin_pam_user_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "weixin_pam_public_account_id" integer, "uid" varchar, "nickname" varchar, "headshot" varchar, "subscribed" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
92
|
+
[1m[36m (0.0ms)[0m [1mselect sqlite_version(*)[0m
|
93
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_weixin_pam_user_accounts_on_weixin_pam_public_account_id" ON "weixin_pam_user_accounts" ("weixin_pam_public_account_id")
|
94
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20151211153353"]]
|
95
|
+
[1m[35m (0.6ms)[0m commit transaction
|
96
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
97
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
98
|
+
FROM sqlite_master
|
99
|
+
WHERE name='index_weixin_pam_user_accounts_on_weixin_pam_public_account_id' AND type='index'
|
100
|
+
UNION ALL
|
101
|
+
SELECT sql
|
102
|
+
FROM sqlite_temp_master
|
103
|
+
WHERE name='index_weixin_pam_user_accounts_on_weixin_pam_public_account_id' AND type='index'
|
104
|
+
|
105
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
106
|
+
Migrating to CreateWeixinPamDiymenus (20151212150808)
|
107
|
+
[1m[35m (0.1ms)[0m begin transaction
|
108
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "weixin_pam_diymenus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "public_account_id" integer, "parent_id" integer, "name" varchar, "key" varchar, "url" varchar, "is_show" boolean, "sort" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
109
|
+
[1m[35m (0.3ms)[0m select sqlite_version(*)
|
110
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_weixin_pam_diymenus_on_public_account_id" ON "weixin_pam_diymenus" ("public_account_id")[0m
|
111
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
112
|
+
FROM sqlite_master
|
113
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
114
|
+
UNION ALL
|
115
|
+
SELECT sql
|
116
|
+
FROM sqlite_temp_master
|
117
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
118
|
+
|
119
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_weixin_pam_diymenus_on_parent_id" ON "weixin_pam_diymenus" ("parent_id")[0m
|
120
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_diymenus_on_key" ON "diymenus" ("key")
|
121
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
122
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
123
|
+
Migrating to CreateWeixinPamDiymenus (20151212150808)
|
124
|
+
[1m[35m (0.1ms)[0m begin transaction
|
125
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "weixin_pam_diymenus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "public_account_id" integer, "parent_id" integer, "name" varchar, "key" varchar, "url" varchar, "is_show" boolean, "sort" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
126
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
127
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_weixin_pam_diymenus_on_public_account_id" ON "weixin_pam_diymenus" ("public_account_id")[0m
|
128
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
129
|
+
FROM sqlite_master
|
130
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
131
|
+
UNION ALL
|
132
|
+
SELECT sql
|
133
|
+
FROM sqlite_temp_master
|
134
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
135
|
+
|
136
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_weixin_pam_diymenus_on_parent_id" ON "weixin_pam_diymenus" ("parent_id")[0m
|
137
|
+
[1m[35m (0.0ms)[0m SELECT sql
|
138
|
+
FROM sqlite_master
|
139
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
140
|
+
UNION ALL
|
141
|
+
SELECT sql
|
142
|
+
FROM sqlite_temp_master
|
143
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
144
|
+
|
145
|
+
[1m[36m (0.0ms)[0m [1m SELECT sql
|
146
|
+
FROM sqlite_master
|
147
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
148
|
+
UNION ALL
|
149
|
+
SELECT sql
|
150
|
+
FROM sqlite_temp_master
|
151
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
152
|
+
[0m
|
153
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_weixin_pam_diymenus_on_key" ON "weixin_pam_diymenus" ("key")
|
154
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20151212150808"]]
|
155
|
+
[1m[35m (2.2ms)[0m commit transaction
|
156
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
157
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
158
|
+
FROM sqlite_master
|
159
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
160
|
+
UNION ALL
|
161
|
+
SELECT sql
|
162
|
+
FROM sqlite_temp_master
|
163
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
164
|
+
|
165
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
166
|
+
FROM sqlite_master
|
167
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
168
|
+
UNION ALL
|
169
|
+
SELECT sql
|
170
|
+
FROM sqlite_temp_master
|
171
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
172
|
+
[0m
|
173
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
174
|
+
FROM sqlite_master
|
175
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
176
|
+
UNION ALL
|
177
|
+
SELECT sql
|
178
|
+
FROM sqlite_temp_master
|
179
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
180
|
+
|
181
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
182
|
+
FROM sqlite_master
|
183
|
+
WHERE name='index_weixin_pam_user_accounts_on_weixin_pam_public_account_id' AND type='index'
|
184
|
+
UNION ALL
|
185
|
+
SELECT sql
|
186
|
+
FROM sqlite_temp_master
|
187
|
+
WHERE name='index_weixin_pam_user_accounts_on_weixin_pam_public_account_id' AND type='index'
|
188
|
+
[0m
|
189
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
190
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
191
|
+
Migrating to CreateWeixinPamDiymenus (20151212150808)
|
192
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
193
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
194
|
+
FROM sqlite_master
|
195
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
196
|
+
UNION ALL
|
197
|
+
SELECT sql
|
198
|
+
FROM sqlite_temp_master
|
199
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
200
|
+
|
201
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
202
|
+
FROM sqlite_master
|
203
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
204
|
+
UNION ALL
|
205
|
+
SELECT sql
|
206
|
+
FROM sqlite_temp_master
|
207
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
208
|
+
[0m
|
209
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
210
|
+
FROM sqlite_master
|
211
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
212
|
+
UNION ALL
|
213
|
+
SELECT sql
|
214
|
+
FROM sqlite_temp_master
|
215
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
216
|
+
|
217
|
+
[1m[36m (0.4ms)[0m [1mDROP INDEX "index_weixin_pam_diymenus_on_key"[0m
|
218
|
+
[1m[35m (0.9ms)[0m DROP TABLE "weixin_pam_diymenus"
|
219
|
+
[1m[36mSQL (0.2ms)[0m [1mDELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = ?[0m [["version", "20151212150808"]]
|
220
|
+
[1m[35m (0.6ms)[0m commit transaction
|
221
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
222
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
223
|
+
FROM sqlite_master
|
224
|
+
WHERE name='index_weixin_pam_user_accounts_on_weixin_pam_public_account_id' AND type='index'
|
225
|
+
UNION ALL
|
226
|
+
SELECT sql
|
227
|
+
FROM sqlite_temp_master
|
228
|
+
WHERE name='index_weixin_pam_user_accounts_on_weixin_pam_public_account_id' AND type='index'
|
229
|
+
|
230
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
231
|
+
Migrating to CreateWeixinPamDiymenus (20151212150808)
|
232
|
+
[1m[35m (0.1ms)[0m begin transaction
|
233
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "weixin_pam_diymenus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "public_account_id" integer, "parent_id" integer, "name" varchar, "key" varchar, "url" varchar, "is_show" boolean, "sort" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
234
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
235
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_weixin_pam_diymenus_on_public_account_id" ON "weixin_pam_diymenus" ("public_account_id")[0m
|
236
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
237
|
+
FROM sqlite_master
|
238
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
239
|
+
UNION ALL
|
240
|
+
SELECT sql
|
241
|
+
FROM sqlite_temp_master
|
242
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
243
|
+
|
244
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_weixin_pam_diymenus_on_parent_id" ON "weixin_pam_diymenus" ("parent_id")[0m
|
245
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
246
|
+
FROM sqlite_master
|
247
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
248
|
+
UNION ALL
|
249
|
+
SELECT sql
|
250
|
+
FROM sqlite_temp_master
|
251
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
252
|
+
|
253
|
+
[1m[36m (0.0ms)[0m [1m SELECT sql
|
254
|
+
FROM sqlite_master
|
255
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
256
|
+
UNION ALL
|
257
|
+
SELECT sql
|
258
|
+
FROM sqlite_temp_master
|
259
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
260
|
+
[0m
|
261
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_weixin_pam_diymenus_on_key" ON "weixin_pam_diymenus" ("key")
|
262
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20151212150808"]]
|
263
|
+
[1m[35m (2.2ms)[0m commit transaction
|
264
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
265
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
266
|
+
FROM sqlite_master
|
267
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
268
|
+
UNION ALL
|
269
|
+
SELECT sql
|
270
|
+
FROM sqlite_temp_master
|
271
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
272
|
+
|
273
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
274
|
+
FROM sqlite_master
|
275
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
276
|
+
UNION ALL
|
277
|
+
SELECT sql
|
278
|
+
FROM sqlite_temp_master
|
279
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
280
|
+
[0m
|
281
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
282
|
+
FROM sqlite_master
|
283
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
284
|
+
UNION ALL
|
285
|
+
SELECT sql
|
286
|
+
FROM sqlite_temp_master
|
287
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
288
|
+
|
289
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
290
|
+
FROM sqlite_master
|
291
|
+
WHERE name='index_weixin_pam_user_accounts_on_weixin_pam_public_account_id' AND type='index'
|
292
|
+
UNION ALL
|
293
|
+
SELECT sql
|
294
|
+
FROM sqlite_temp_master
|
295
|
+
WHERE name='index_weixin_pam_user_accounts_on_weixin_pam_public_account_id' AND type='index'
|
296
|
+
[0m
|
297
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
298
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
299
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
300
|
+
FROM sqlite_master
|
301
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
302
|
+
UNION ALL
|
303
|
+
SELECT sql
|
304
|
+
FROM sqlite_temp_master
|
305
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
306
|
+
[0m
|
307
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
308
|
+
FROM sqlite_master
|
309
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
310
|
+
UNION ALL
|
311
|
+
SELECT sql
|
312
|
+
FROM sqlite_temp_master
|
313
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
314
|
+
|
315
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
316
|
+
FROM sqlite_master
|
317
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
318
|
+
UNION ALL
|
319
|
+
SELECT sql
|
320
|
+
FROM sqlite_temp_master
|
321
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
322
|
+
[0m
|
323
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
324
|
+
FROM sqlite_master
|
325
|
+
WHERE name='index_weixin_pam_user_accounts_on_weixin_pam_public_account_id' AND type='index'
|
326
|
+
UNION ALL
|
327
|
+
SELECT sql
|
328
|
+
FROM sqlite_temp_master
|
329
|
+
WHERE name='index_weixin_pam_user_accounts_on_weixin_pam_public_account_id' AND type='index'
|
330
|
+
|
331
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
332
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
333
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
334
|
+
FROM sqlite_master
|
335
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
336
|
+
UNION ALL
|
337
|
+
SELECT sql
|
338
|
+
FROM sqlite_temp_master
|
339
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
340
|
+
[0m
|
341
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
342
|
+
FROM sqlite_master
|
343
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
344
|
+
UNION ALL
|
345
|
+
SELECT sql
|
346
|
+
FROM sqlite_temp_master
|
347
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
348
|
+
|
349
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
350
|
+
FROM sqlite_master
|
351
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
352
|
+
UNION ALL
|
353
|
+
SELECT sql
|
354
|
+
FROM sqlite_temp_master
|
355
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
356
|
+
[0m
|
357
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
358
|
+
FROM sqlite_master
|
359
|
+
WHERE name='index_weixin_pam_user_accounts_on_weixin_pam_public_account_id' AND type='index'
|
360
|
+
UNION ALL
|
361
|
+
SELECT sql
|
362
|
+
FROM sqlite_temp_master
|
363
|
+
WHERE name='index_weixin_pam_user_accounts_on_weixin_pam_public_account_id' AND type='index'
|
364
|
+
|
365
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "weixin_pam_diymenus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "public_account_id" integer, "parent_id" integer, "name" varchar, "key" varchar, "url" varchar, "is_show" boolean, "sort" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
366
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
367
|
+
[1m[36m (0.7ms)[0m [1mCREATE INDEX "index_weixin_pam_diymenus_on_key" ON "weixin_pam_diymenus" ("key")[0m
|
368
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
369
|
+
FROM sqlite_master
|
370
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
371
|
+
UNION ALL
|
372
|
+
SELECT sql
|
373
|
+
FROM sqlite_temp_master
|
374
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
375
|
+
|
376
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_weixin_pam_diymenus_on_parent_id" ON "weixin_pam_diymenus" ("parent_id")[0m
|
377
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
378
|
+
FROM sqlite_master
|
379
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
380
|
+
UNION ALL
|
381
|
+
SELECT sql
|
382
|
+
FROM sqlite_temp_master
|
383
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
384
|
+
|
385
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
386
|
+
FROM sqlite_master
|
387
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
388
|
+
UNION ALL
|
389
|
+
SELECT sql
|
390
|
+
FROM sqlite_temp_master
|
391
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
392
|
+
[0m
|
393
|
+
[1m[35m (0.6ms)[0m CREATE INDEX "index_weixin_pam_diymenus_on_public_account_id" ON "weixin_pam_diymenus" ("public_account_id")
|
394
|
+
[1m[36m (0.6ms)[0m [1mCREATE TABLE "weixin_pam_public_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "app_id" varchar, "app_secret" varchar, "api_url" varchar, "api_token" varchar, "enabled" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
395
|
+
[1m[35m (0.6ms)[0m CREATE TABLE "weixin_pam_user_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "weixin_pam_public_account_id" integer, "uid" varchar, "nickname" varchar, "headshot" varchar, "subscribed" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
396
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_weixin_pam_user_accounts_on_weixin_pam_public_account_id" ON "weixin_pam_user_accounts" ("weixin_pam_public_account_id")[0m
|
397
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
|
398
|
+
[1m[36m (0.6ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
399
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
400
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151212150808')[0m
|
401
|
+
[1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20151211153307')
|
402
|
+
[1m[36m (0.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151211153353')[0m
|
403
|
+
[1m[35m (0.6ms)[0m CREATE TABLE "weixin_pam_diymenus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "public_account_id" integer, "parent_id" integer, "name" varchar, "key" varchar, "url" varchar, "is_show" boolean, "sort" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
404
|
+
[1m[36m (0.0ms)[0m [1mselect sqlite_version(*)[0m
|
405
|
+
[1m[35m (0.5ms)[0m CREATE INDEX "index_weixin_pam_diymenus_on_key" ON "weixin_pam_diymenus" ("key")
|
406
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
407
|
+
FROM sqlite_master
|
408
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
409
|
+
UNION ALL
|
410
|
+
SELECT sql
|
411
|
+
FROM sqlite_temp_master
|
412
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
413
|
+
[0m
|
414
|
+
[1m[35m (0.7ms)[0m CREATE INDEX "index_weixin_pam_diymenus_on_parent_id" ON "weixin_pam_diymenus" ("parent_id")
|
415
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
416
|
+
FROM sqlite_master
|
417
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
418
|
+
UNION ALL
|
419
|
+
SELECT sql
|
420
|
+
FROM sqlite_temp_master
|
421
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
422
|
+
[0m
|
423
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
424
|
+
FROM sqlite_master
|
425
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
426
|
+
UNION ALL
|
427
|
+
SELECT sql
|
428
|
+
FROM sqlite_temp_master
|
429
|
+
WHERE name='index_weixin_pam_diymenus_on_key' AND type='index'
|
430
|
+
|
431
|
+
[1m[36m (0.6ms)[0m [1mCREATE INDEX "index_weixin_pam_diymenus_on_public_account_id" ON "weixin_pam_diymenus" ("public_account_id")[0m
|
432
|
+
[1m[35m (0.6ms)[0m CREATE TABLE "weixin_pam_public_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "app_id" varchar, "app_secret" varchar, "api_url" varchar, "api_token" varchar, "enabled" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
433
|
+
[1m[36m (0.6ms)[0m [1mCREATE TABLE "weixin_pam_user_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "weixin_pam_public_account_id" integer, "uid" varchar, "nickname" varchar, "headshot" varchar, "subscribed" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
434
|
+
[1m[35m (0.6ms)[0m CREATE INDEX "index_weixin_pam_user_accounts_on_weixin_pam_public_account_id" ON "weixin_pam_user_accounts" ("weixin_pam_public_account_id")
|
435
|
+
[1m[36m (0.5ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
436
|
+
[1m[35m (0.5ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
437
|
+
[1m[36m (0.1ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
438
|
+
[1m[35m (0.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20151212150808')
|
439
|
+
[1m[36m (0.4ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20151211153307')[0m
|
440
|
+
[1m[35m (0.4ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20151211153353')
|
441
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
442
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
443
|
+
Migrating to CreateWeixinPamDiymenus (20151212152624)
|
444
|
+
[1m[35m (0.1ms)[0m begin transaction
|
445
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "weixin_pam_diymenus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "public_account_id" integer, "parent_id" integer, "name" varchar, "key" varchar, "url" varchar, "is_show" boolean, "sort" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
446
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
447
|
+
[1m[36m (2.5ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
448
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
449
|
+
[1m[36m (0.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
450
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
451
|
+
Migrating to CreateWeixinPamPublicAccounts (20151211153307)
|
452
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
453
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "weixin_pam_public_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "app_id" varchar, "app_secret" varchar, "api_url" varchar, "api_token" varchar, "enabled" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
454
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20151211153307"]]
|
455
|
+
[1m[35m (0.6ms)[0m commit transaction
|
456
|
+
Migrating to CreateWeixinPamUserAccounts (20151211153353)
|
457
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
458
|
+
[1m[35m (0.3ms)[0m CREATE TABLE "weixin_pam_user_accounts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "public_account_id" integer, "uid" varchar, "nickname" varchar, "headshot" varchar, "subscribed" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
459
|
+
[1m[36m (0.1ms)[0m [1mCREATE INDEX "index_weixin_pam_user_accounts_on_public_account_id" ON "weixin_pam_user_accounts" ("public_account_id")[0m
|
460
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
461
|
+
FROM sqlite_master
|
462
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
463
|
+
UNION ALL
|
464
|
+
SELECT sql
|
465
|
+
FROM sqlite_temp_master
|
466
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
467
|
+
|
468
|
+
[1m[36m (1.1ms)[0m [1mCREATE UNIQUE INDEX "index_weixin_pam_user_accounts_on_public_account_id_and_uid" ON "weixin_pam_user_accounts" ("public_account_id", "uid")[0m
|
469
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151211153353"]]
|
470
|
+
[1m[36m (2.6ms)[0m [1mcommit transaction[0m
|
471
|
+
Migrating to CreateWeixinPamDiymenus (20151212152624)
|
472
|
+
[1m[35m (0.0ms)[0m begin transaction
|
473
|
+
[1m[36m (0.2ms)[0m [1mCREATE TABLE "weixin_pam_diymenus" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "public_account_id" integer, "parent_id" integer, "name" varchar, "key" varchar, "url" varchar, "is_show" boolean, "sort" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
474
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_weixin_pam_diymenus_on_public_account_id" ON "weixin_pam_diymenus" ("public_account_id")
|
475
|
+
[1m[36m (0.0ms)[0m [1m SELECT sql
|
476
|
+
FROM sqlite_master
|
477
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
478
|
+
UNION ALL
|
479
|
+
SELECT sql
|
480
|
+
FROM sqlite_temp_master
|
481
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
482
|
+
[0m
|
483
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_weixin_pam_diymenus_on_parent_id" ON "weixin_pam_diymenus" ("parent_id")
|
484
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20151212152624"]]
|
485
|
+
[1m[35m (0.6ms)[0m commit transaction
|
486
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
487
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
488
|
+
FROM sqlite_master
|
489
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
490
|
+
UNION ALL
|
491
|
+
SELECT sql
|
492
|
+
FROM sqlite_temp_master
|
493
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
494
|
+
|
495
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
496
|
+
FROM sqlite_master
|
497
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
498
|
+
UNION ALL
|
499
|
+
SELECT sql
|
500
|
+
FROM sqlite_temp_master
|
501
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
502
|
+
[0m
|
503
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
504
|
+
FROM sqlite_master
|
505
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id_and_uid' AND type='index'
|
506
|
+
UNION ALL
|
507
|
+
SELECT sql
|
508
|
+
FROM sqlite_temp_master
|
509
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id_and_uid' AND type='index'
|
510
|
+
|
511
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
512
|
+
FROM sqlite_master
|
513
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
514
|
+
UNION ALL
|
515
|
+
SELECT sql
|
516
|
+
FROM sqlite_temp_master
|
517
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
518
|
+
[0m
|
519
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
520
|
+
Migrating to AddWeixinSecretKeyAndWeixinTokenToPublicAccounts (20151215140830)
|
521
|
+
[1m[35m (0.1ms)[0m begin transaction
|
522
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
523
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
524
|
+
Migrating to AddWeixinSecretKeyAndWeixinTokenToPublicAccounts (20151215140830)
|
525
|
+
[1m[35m (0.1ms)[0m begin transaction
|
526
|
+
[1m[36m (0.1ms)[0m [1mALTER TABLE "public_accounts" ADD "weixin_secret_key" varchar[0m
|
527
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
528
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
529
|
+
Migrating to AddWeixinSecretKeyAndWeixinTokenToPublicAccounts (20151215140830)
|
530
|
+
[1m[35m (0.1ms)[0m begin transaction
|
531
|
+
[1m[36m (0.4ms)[0m [1mALTER TABLE "weixin_pam_public_accounts" ADD "weixin_secret_key" varchar[0m
|
532
|
+
[1m[35m (0.1ms)[0m ALTER TABLE "weixin_pam_public_accounts" ADD "weixin_token" varchar
|
533
|
+
[1m[36m (2.1ms)[0m [1mselect sqlite_version(*)[0m
|
534
|
+
[1m[35m (0.4ms)[0m CREATE INDEX "index_weixin_pam_public_accounts_on_weixin_secret_key" ON "weixin_pam_public_accounts" ("weixin_secret_key")
|
535
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
536
|
+
FROM sqlite_master
|
537
|
+
WHERE name='index_weixin_pam_public_accounts_on_weixin_secret_key' AND type='index'
|
538
|
+
UNION ALL
|
539
|
+
SELECT sql
|
540
|
+
FROM sqlite_temp_master
|
541
|
+
WHERE name='index_weixin_pam_public_accounts_on_weixin_secret_key' AND type='index'
|
542
|
+
[0m
|
543
|
+
[1m[35m (0.1ms)[0m CREATE INDEX "index_weixin_pam_public_accounts_on_weixin_token" ON "weixin_pam_public_accounts" ("weixin_token")
|
544
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20151215140830"]]
|
545
|
+
[1m[35m (2.0ms)[0m commit transaction
|
546
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
547
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
548
|
+
FROM sqlite_master
|
549
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
550
|
+
UNION ALL
|
551
|
+
SELECT sql
|
552
|
+
FROM sqlite_temp_master
|
553
|
+
WHERE name='index_weixin_pam_diymenus_on_parent_id' AND type='index'
|
554
|
+
|
555
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
556
|
+
FROM sqlite_master
|
557
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
558
|
+
UNION ALL
|
559
|
+
SELECT sql
|
560
|
+
FROM sqlite_temp_master
|
561
|
+
WHERE name='index_weixin_pam_diymenus_on_public_account_id' AND type='index'
|
562
|
+
[0m
|
563
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
564
|
+
FROM sqlite_master
|
565
|
+
WHERE name='index_weixin_pam_public_accounts_on_weixin_token' AND type='index'
|
566
|
+
UNION ALL
|
567
|
+
SELECT sql
|
568
|
+
FROM sqlite_temp_master
|
569
|
+
WHERE name='index_weixin_pam_public_accounts_on_weixin_token' AND type='index'
|
570
|
+
|
571
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
572
|
+
FROM sqlite_master
|
573
|
+
WHERE name='index_weixin_pam_public_accounts_on_weixin_secret_key' AND type='index'
|
574
|
+
UNION ALL
|
575
|
+
SELECT sql
|
576
|
+
FROM sqlite_temp_master
|
577
|
+
WHERE name='index_weixin_pam_public_accounts_on_weixin_secret_key' AND type='index'
|
578
|
+
[0m
|
579
|
+
[1m[35m (0.1ms)[0m SELECT sql
|
580
|
+
FROM sqlite_master
|
581
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id_and_uid' AND type='index'
|
582
|
+
UNION ALL
|
583
|
+
SELECT sql
|
584
|
+
FROM sqlite_temp_master
|
585
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id_and_uid' AND type='index'
|
586
|
+
|
587
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
588
|
+
FROM sqlite_master
|
589
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
590
|
+
UNION ALL
|
591
|
+
SELECT sql
|
592
|
+
FROM sqlite_temp_master
|
593
|
+
WHERE name='index_weixin_pam_user_accounts_on_public_account_id' AND type='index'
|
594
|
+
[0m
|