<commit_before># encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20151019181951) do

  # These are extensions that must be enabled in order to support this database
  enable_extension "plpgsql"

  create_table "action_users", force: :cascade do |t|
    t.string   "email"
    t.string   "country"
    t.string   "first_name"
    t.string   "last_name"
    t.string   "city"
    t.string   "postal_code"
    t.string   "title"
    t.string   "address1"
    t.string   "address2"
    t.datetime "created_at",  null: false
    t.datetime "updated_at",  null: false
  end

  create_table "actionkit_page_types", force: :cascade do |t|
    t.string "actionkit_page_type", null: false
  end

  create_table "actionkit_pages", force: :cascade do |t|
    t.integer "actionkit_id",           null: false
    t.integer "actionkit_page_type_id", null: false
  end

  create_table "actions", force: :cascade do |t|
    t.integer  "page_id"
    t.integer  "action_user_id"
    t.string   "link"
    t.boolean  "created_user"
    t.boolean  "subscribed_user"
    t.datetime "created_at",      null: false
    t.datetime "updated_at",      null: false
    t.jsonb    "form_data"
  end

  add_index "actions", ["action_user_id"], name: "index_actions_on_action_user_id", using: :btree
  add_index "actions", ["page_id"], name: "index_actions_on_page_id", using: :btree

  create_table "ak_logs", force: :cascade do |t|
    t.text     "request_body"
    t.text     "response_body"
    t.string   "response_status"
    t.string   "resource"
    t.datetime "created_at",      null: false
    t.datetime "updated_at",      null: false
  end

  create_table "campaigns", force: :cascade do |t|
    t.string   "name"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.boolean  "active",     default: true
  end

  create_table "form_elements", force: :cascade do |t|
    t.integer  "form_id"
    t.string   "label"
    t.string   "data_type"
    t.string   "field_type"
    t.string   "default_value"
    t.boolean  "required"
    t.boolean  "visible"
    t.datetime "created_at",                null: false
    t.datetime "updated_at",                null: false
    t.string   "name"
    t.integer  "position",      default: 0, null: false
  end

  add_index "form_elements", ["form_id"], name: "index_form_elements_on_form_id", using: :btree

  create_table "forms", force: :cascade do |t|
    t.string   "name"
    t.string   "description"
    t.datetime "created_at",                  null: false
    t.datetime "updated_at",                  null: false
    t.boolean  "visible",     default: false
    t.boolean  "master",      default: false
  end

  create_table "images", force: :cascade do |t|
    t.string   "content_file_name"
    t.string   "content_content_type"
    t.integer  "content_file_size"
    t.datetime "content_updated_at"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "page_id"
  end

  add_index "images", ["page_id"], name: "index_images_on_page_id", using: :btree

  create_table "languages", force: :cascade do |t|
    t.string   "code",       null: false
    t.string   "name",       null: false
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "links", force: :cascade do |t|
    t.string   "url"
    t.string   "title"
    t.string   "date"
    t.string   "source"
    t.integer  "page_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  add_index "links", ["page_id"], name: "index_links_on_page_id", using: :btree

  create_table "liquid_layouts", force: :cascade do |t|
    t.string   "title"
    t.text     "content"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "liquid_partials", force: :cascade do |t|
    t.string   "title"
    t.text     "content"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "members", force: :cascade do |t|
    t.string "email_address",       null: false
    t.string "actionkit_member_id", null: false
  end

  create_table "pages", force: :cascade do |t|
    t.integer  "language_id"
    t.integer  "campaign_id"
    t.string   "title",                                          null: false
    t.string   "slug",                                           null: false
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "compiled_html"
    t.text     "content",                    default: ""
    t.boolean  "thermometer",                default: false
    t.boolean  "featured",                   default: false
    t.boolean  "active",                     default: false
    t.string   "status",                     default: "pending"
    t.text     "messages"
    t.integer  "liquid_layout_id"
    t.integer  "secondary_liquid_layout_id"
    t.integer  "action_count"
  end

  add_index "pages", ["liquid_layout_id"], name: "index_pages_on_liquid_layout_id", using: :btree
  add_index "pages", ["secondary_liquid_layout_id"], name: "index_pages_on_secondary_liquid_layout_id", using: :btree

  create_table "pages_tags", force: :cascade do |t|
    t.integer "page_id"
    t.integer "tag_id"
  end

  create_table "plugins_actions", force: :cascade do |t|
    t.integer  "page_id"
    t.boolean  "active",      default: false
    t.integer  "form_id"
    t.datetime "created_at",                  null: false
    t.datetime "updated_at",                  null: false
    t.text     "description"
    t.string   "ref"
    t.string   "target"
    t.string   "cta"
  end

  add_index "plugins_actions", ["form_id"], name: "index_plugins_actions_on_form_id", using: :btree
  add_index "plugins_actions", ["page_id"], name: "index_plugins_actions_on_page_id", using: :btree

  create_table "plugins_thermometers", force: :cascade do |t|
    t.string   "title"
    t.integer  "offset"
    t.integer  "goal"
    t.integer  "page_id"
    t.boolean  "active",     default: false<commit_msg>update schema.rb with action_count default<commit_after># encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20151019181951) do

  # These are extensions that must be enabled in order to support this database
  enable_extension "plpgsql"

  create_table "action_users", force: :cascade do |t|
    t.string   "email"
    t.string   "country"
    t.string   "first_name"
    t.string   "last_name"
    t.string   "city"
    t.string   "postal_code"
    t.string   "title"
    t.string   "address1"
    t.string   "address2"
    t.datetime "created_at",  null: false
    t.datetime "updated_at",  null: false
  end

  create_table "actionkit_page_types", force: :cascade do |t|
    t.string "actionkit_page_type", null: false
  end

  create_table "actionkit_pages", force: :cascade do |t|
    t.integer "actionkit_id",           null: false
    t.integer "actionkit_page_type_id", null: false
  end

  create_table "actions", force: :cascade do |t|
    t.integer  "page_id"
    t.integer  "action_user_id"
    t.string   "link"
    t.boolean  "created_user"
    t.boolean  "subscribed_user"
    t.datetime "created_at",      null: false
    t.datetime "updated_at",      null: false
    t.jsonb    "form_data"
  end

  add_index "actions", ["action_user_id"], name: "index_actions_on_action_user_id", using: :btree
  add_index "actions", ["page_id"], name: "index_actions_on_page_id", using: :btree

  create_table "ak_logs", force: :cascade do |t|
    t.text     "request_body"
    t.text     "response_body"
    t.string   "response_status"
    t.string   "resource"
    t.datetime "created_at",      null: false
    t.datetime "updated_at",      null: false
  end

  create_table "campaigns", force: :cascade do |t|
    t.string   "name"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.boolean  "active",     default: true
  end

  create_table "form_elements", force: :cascade do |t|
    t.integer  "form_id"
    t.string   "label"
    t.string   "data_type"
    t.string   "field_type"
    t.string   "default_value"
    t.boolean  "required"
    t.boolean  "visible"
    t.datetime "created_at",                null: false
    t.datetime "updated_at",                null: false
    t.string   "name"
    t.integer  "position",      default: 0, null: false
  end

  add_index "form_elements", ["form_id"], name: "index_form_elements_on_form_id", using: :btree

  create_table "forms", force: :cascade do |t|
    t.string   "name"
    t.string   "description"
    t.datetime "created_at",                  null: false
    t.datetime "updated_at",                  null: false
    t.boolean  "visible",     default: false
    t.boolean  "master",      default: false
  end

  create_table "images", force: :cascade do |t|
    t.string   "content_file_name"
    t.string   "content_content_type"
    t.integer  "content_file_size"
    t.datetime "content_updated_at"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "page_id"
  end

  add_index "images", ["page_id"], name: "index_images_on_page_id", using: :btree

  create_table "languages", force: :cascade do |t|
    t.string   "code",       null: false
    t.string   "name",       null: false
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "links", force: :cascade do |t|
    t.string   "url"
    t.string   "title"
    t.string   "date"
    t.string   "source"
    t.integer  "page_id"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  add_index "links", ["page_id"], name: "index_links_on_page_id", using: :btree

  create_table "liquid_layouts", force: :cascade do |t|
    t.string   "title"
    t.text     "content"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "liquid_partials", force: :cascade do |t|
    t.string   "title"
    t.text     "content"
    t.datetime "created_at", null: false
    t.datetime "updated_at", null: false
  end

  create_table "members", force: :cascade do |t|
    t.string "email_address",       null: false
    t.string "actionkit_member_id", null: false
  end

  create_table "pages", force: :cascade do |t|
    t.integer  "language_id"
    t.integer  "campaign_id"
    t.string   "title",                                          null: false
    t.string   "slug",                                           null: false
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "compiled_html"
    t.text     "content",                    default: ""
    t.boolean  "thermometer",                default: false
    t.boolean  "featured",                   default: false
    t.boolean  "active",                     default: false
    t.string   "status",                     default: "pending"
    t.text     "messages"
    t.integer  "liquid_layout_id"
    t.integer  "secondary_liquid_layout_id"
    t.integer  "action_count",               default: 0
  end

  add_index "pages", ["liquid_layout_id"], name: "index_pages_on_liquid_layout_id", using: :btree
  add_index "pages", ["secondary_liquid_layout_id"], name: "index_pages_on_secondary_liquid_layout_id", using: :btree

  create_table "pages_tags", force: :cascade do |t|
    t.integer "page_id"
    t.integer "tag_id"
  end

  create_table "plugins_actions", force: :cascade do |t|
    t.integer  "page_id"
    t.boolean  "active",      default: false
    t.integer  "form_id"
    t.datetime "created_at",                  null: false
    t.datetime "updated_at",                  null: false
    t.text     "description"
    t.string   "ref"
    t.string   "target"
    t.string   "cta"
  end

  add_index "plugins_actions", ["form_id"], name: "index_plugins_actions_on_form_id", using: :btree
  add_index "plugins_actions", ["page_id"], name: "index_plugins_actions_on_page_id", using: :btree

  create_table "plugins_thermometers", force: :cascade do |t|
    t.string   "title"
    t.integer  "offset"
    t.integer  "goal"
    t.integer  "page_id"
    t.boolean  "active",     default: false
{'fraction_non_alphanumeric': 0.10536099338240762, 'fraction_numerical': 0.0027511339133021043, 'mean_word_length': 2.746518105849582, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '47894', 'n_tokens_mistral': 4496, 'n_tokens_neox': 4352, 'n_words': 1227}