<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: 20150430132128) do

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

  create_table "access_control_lists", force: :cascade do |t|
    t.integer  "user_group_id"
    t.string   "roles",         default: [], null: false, array: true
    t.integer  "resource_id"
    t.string   "resource_type"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "access_control_lists", ["resource_id", "resource_type"], name: "index_access_control_lists_on_resource_id_and_resource_type", using: :btree
  add_index "access_control_lists", ["roles"], name: "index_access_control_lists_on_roles", using: :gin
  add_index "access_control_lists", ["user_group_id"], name: "index_access_control_lists_on_user_group_id", using: :btree

  create_table "aggregations", force: :cascade do |t|
    t.integer  "workflow_id"
    t.integer  "subject_id"
    t.jsonb    "aggregation", default: {}, null: false
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "aggregations", ["subject_id"], name: "index_aggregations_on_subject_id", using: :btree
  add_index "aggregations", ["workflow_id"], name: "index_aggregations_on_workflow_id", using: :btree

  create_table "authorizations", force: :cascade do |t|
    t.integer  "user_id"
    t.string   "provider"
    t.string   "uid"
    t.string   "token"
    t.datetime "expires_at"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "authorizations", ["user_id"], name: "index_authorizations_on_user_id", using: :btree

  create_table "classifications", force: :cascade do |t|
    t.integer  "project_id"
    t.integer  "user_id"
    t.integer  "workflow_id"
    t.jsonb    "annotations",       default: {}
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "user_group_id"
    t.inet     "user_ip"
    t.boolean  "completed",         default: true, null: false
    t.boolean  "gold_standard"
    t.integer  "expert_classifier"
    t.jsonb    "metadata",          default: {},   null: false
    t.integer  "subject_ids",       default: [],                array: true
  end

  add_index "classifications", ["created_at"], name: "index_classifications_on_created_at", using: :btree
  add_index "classifications", ["project_id"], name: "index_classifications_on_project_id", using: :btree
  add_index "classifications", ["user_group_id"], name: "index_classifications_on_user_group_id", using: :btree
  add_index "classifications", ["user_id"], name: "index_classifications_on_user_id", using: :btree
  add_index "classifications", ["workflow_id"], name: "index_classifications_on_workflow_id", using: :btree

  create_table "collections", force: :cascade do |t|
    t.string   "name"
    t.integer  "project_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "activated_state", default: 0, null: false
    t.string   "display_name"
    t.boolean  "private"
    t.integer  "lock_version",    default: 0
  end

  add_index "collections", ["project_id"], name: "index_collections_on_project_id", using: :btree

  create_table "collections_subjects", id: false, force: :cascade do |t|
    t.integer "subject_id",    null: false
    t.integer "collection_id", null: false
  end

  create_table "memberships", force: :cascade do |t|
    t.integer  "state",         default: 2,                null: false
    t.integer  "user_group_id"
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "roles",         default: ["group_member"], null: false, array: true
    t.boolean  "identity",      default: false,            null: false
  end

  add_index "memberships", ["user_group_id"], name: "index_memberships_on_user_group_id", using: :btree
  add_index "memberships", ["user_id", "identity"], name: "index_memberships_on_user_id_and_identity", unique: true, where: "(identity = true)", using: :btree
  add_index "memberships", ["user_id"], name: "index_memberships_on_user_id", using: :btree

  create_table "oauth_access_grants", force: :cascade do |t|
    t.integer  "resource_owner_id", null: false
    t.integer  "application_id",    null: false
    t.string   "token",             null: false
    t.integer  "expires_in",        null: false
    t.text     "redirect_uri",      null: false
    t.datetime "created_at",        null: false
    t.datetime "revoked_at"
    t.string   "scopes"
  end

  add_index "oauth_access_grants", ["token"], name: "index_oauth_access_grants_on_token", unique: true, using: :btree

  create_table "oauth_access_tokens", force: :cascade do |t|
    t.integer  "resource_owner_id"
    t.integer  "application_id"
    t.string   "token",             null: false
    t.string   "refresh_token"
    t.integer  "expires_in"
    t.datetime "revoked_at"
    t.datetime "created_at",        null: false
    t.string   "scopes"
  end

  add_index "oauth_access_tokens", ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true, using: :btree
  add_index "oauth_access_tokens", ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id", using: :btree
  add_index "oauth_access_tokens", ["token"], name: "index_oauth_access_tokens_on_token", unique: true, using: :btree

  create_table "oauth_applications", force: :cascade do |t|
    t.string   "name",                       null: false
    t.string   "uid",                        null: false
    t.string   "secret",                     null: false
    t.text     "redirect_uri",               null: false
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "owner_id"
    t.string   "owner_type"
    t.integer  "trust_level",   default: 0,  null: false
    t.string   "default_scope", default: [],              array: true
  end

  add_index "oauth_applications", ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type", using: :btree
  add_index "oauth_applications", ["uid"], name: "index_oauth_applications_on_uid", unique: true, using: :btree

  create_table "project_contents", force: :cascade do |t|
    t.integer  "project_id"
    t.string   "language"
    t.string   "title"
    t.text     "description"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "introduction"
    t.text     "science_case"
    t.json     "team_members"
    t.json     "guide"
    t.text     "faq"
    t.text     "result"
    t.text     "education_content"
  end

  add_index "project_contents", ["project_id"], name: "index_project_contents_on_project_id", using: :btree

  create_table "projects", force: :cascade do |t|
    t.string   "name"
    t.string   "display_name"
    t.integer  "user_count"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "classifications_count", default: 0, null: false
    t.integer  "activated_state",       default: 0, null: false
    t.string   "primary_language"
    t.text     "avatar"
    t.text     "background_image"
    t.boolean  "private"
    t.integer  "lock_version",          default: 0
    t.jsonb    "configuration"
    t.boolean  "approved",              default: false
    t.boolean  "beta",                  default: false
    t.boolean  "live",                  default: false
  end

  add_index "projects", ["approved"], name: "index_projects_on_approved", using: :btree
  add_index "projects", ["beta"], name: "index_projects_on_beta", using: :btree

  create_table "set_member_subjects", force: :cascade do |t|
    t.integer  "subject_set_id"
    t.integer  "subject_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.decimal  "priority"
    t.integer  "lock_version",         default: 0
    t.decimal  "random",                            null: false
    t.integer  "retired_workflow_ids", default: [],              array: true
  end
<commit_msg>update the db schema after a rebase<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: 20150430132128) do

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

  create_table "access_control_lists", force: :cascade do |t|
    t.integer  "user_group_id"
    t.string   "roles",         default: [], null: false, array: true
    t.integer  "resource_id"
    t.string   "resource_type"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "access_control_lists", ["resource_id", "resource_type"], name: "index_access_control_lists_on_resource_id_and_resource_type", using: :btree
  add_index "access_control_lists", ["roles"], name: "index_access_control_lists_on_roles", using: :gin
  add_index "access_control_lists", ["user_group_id"], name: "index_access_control_lists_on_user_group_id", using: :btree

  create_table "aggregations", force: :cascade do |t|
    t.integer  "workflow_id"
    t.integer  "subject_id"
    t.jsonb    "aggregation", default: {}, null: false
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "aggregations", ["subject_id"], name: "index_aggregations_on_subject_id", using: :btree
  add_index "aggregations", ["workflow_id"], name: "index_aggregations_on_workflow_id", using: :btree

  create_table "authorizations", force: :cascade do |t|
    t.integer  "user_id"
    t.string   "provider"
    t.string   "uid"
    t.string   "token"
    t.datetime "expires_at"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "authorizations", ["user_id"], name: "index_authorizations_on_user_id", using: :btree

  create_table "classifications", force: :cascade do |t|
    t.integer  "project_id"
    t.integer  "user_id"
    t.integer  "workflow_id"
    t.jsonb    "annotations",       default: {}
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "user_group_id"
    t.inet     "user_ip"
    t.boolean  "completed",         default: true, null: false
    t.boolean  "gold_standard"
    t.integer  "expert_classifier"
    t.jsonb    "metadata",          default: {},   null: false
    t.integer  "subject_ids",       default: [],                array: true
  end

  add_index "classifications", ["created_at"], name: "index_classifications_on_created_at", using: :btree
  add_index "classifications", ["project_id"], name: "index_classifications_on_project_id", using: :btree
  add_index "classifications", ["user_group_id"], name: "index_classifications_on_user_group_id", using: :btree
  add_index "classifications", ["user_id"], name: "index_classifications_on_user_id", using: :btree
  add_index "classifications", ["workflow_id"], name: "index_classifications_on_workflow_id", using: :btree

  create_table "collections", force: :cascade do |t|
    t.string   "name"
    t.integer  "project_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "activated_state", default: 0, null: false
    t.string   "display_name"
    t.boolean  "private"
    t.integer  "lock_version",    default: 0
  end

  add_index "collections", ["project_id"], name: "index_collections_on_project_id", using: :btree

  create_table "collections_subjects", id: false, force: :cascade do |t|
    t.integer "subject_id",    null: false
    t.integer "collection_id", null: false
  end

  create_table "memberships", force: :cascade do |t|
    t.integer  "state",         default: 2,                null: false
    t.integer  "user_group_id"
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "roles",         default: ["group_member"], null: false, array: true
    t.boolean  "identity",      default: false,            null: false
  end

  add_index "memberships", ["user_group_id"], name: "index_memberships_on_user_group_id", using: :btree
  add_index "memberships", ["user_id", "identity"], name: "index_memberships_on_user_id_and_identity", unique: true, where: "(identity = true)", using: :btree
  add_index "memberships", ["user_id"], name: "index_memberships_on_user_id", using: :btree

  create_table "oauth_access_grants", force: :cascade do |t|
    t.integer  "resource_owner_id", null: false
    t.integer  "application_id",    null: false
    t.string   "token",             null: false
    t.integer  "expires_in",        null: false
    t.text     "redirect_uri",      null: false
    t.datetime "created_at",        null: false
    t.datetime "revoked_at"
    t.string   "scopes"
  end

  add_index "oauth_access_grants", ["token"], name: "index_oauth_access_grants_on_token", unique: true, using: :btree

  create_table "oauth_access_tokens", force: :cascade do |t|
    t.integer  "resource_owner_id"
    t.integer  "application_id"
    t.string   "token",             null: false
    t.string   "refresh_token"
    t.integer  "expires_in"
    t.datetime "revoked_at"
    t.datetime "created_at",        null: false
    t.string   "scopes"
  end

  add_index "oauth_access_tokens", ["refresh_token"], name: "index_oauth_access_tokens_on_refresh_token", unique: true, using: :btree
  add_index "oauth_access_tokens", ["resource_owner_id"], name: "index_oauth_access_tokens_on_resource_owner_id", using: :btree
  add_index "oauth_access_tokens", ["token"], name: "index_oauth_access_tokens_on_token", unique: true, using: :btree

  create_table "oauth_applications", force: :cascade do |t|
    t.string   "name",                       null: false
    t.string   "uid",                        null: false
    t.string   "secret",                     null: false
    t.text     "redirect_uri",               null: false
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "owner_id"
    t.string   "owner_type"
    t.integer  "trust_level",   default: 0,  null: false
    t.string   "default_scope", default: [],              array: true
  end

  add_index "oauth_applications", ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type", using: :btree
  add_index "oauth_applications", ["uid"], name: "index_oauth_applications_on_uid", unique: true, using: :btree

  create_table "project_contents", force: :cascade do |t|
    t.integer  "project_id"
    t.string   "language"
    t.string   "title"
    t.text     "description"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "introduction"
    t.text     "science_case"
    t.json     "team_members"
    t.json     "guide"
    t.text     "faq"
    t.text     "result"
    t.text     "education_content"
  end

  add_index "project_contents", ["project_id"], name: "index_project_contents_on_project_id", using: :btree

  create_table "projects", force: :cascade do |t|
    t.string   "name"
    t.string   "display_name"
    t.integer  "user_count"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "classifications_count", default: 0, null: false
    t.integer  "activated_state",       default: 0, null: false
    t.string   "primary_language"
    t.text     "avatar"
    t.text     "background_image"
    t.boolean  "private"
    t.integer  "lock_version",          default: 0
    t.jsonb    "configuration"
    t.boolean  "approved",              default: false
    t.boolean  "beta",                  default: false
    t.boolean  "live",                  default: false, null: false
  end

  add_index "projects", ["approved"], name: "index_projects_on_approved", using: :btree
  add_index "projects", ["beta"], name: "index_projects_on_beta", using: :btree

  create_table "set_member_subjects", force: :cascade do |t|
    t.integer  "subject_set_id"
    t.integer  "subject_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.decimal  "priority"
    t.integer  "lock_version",         default: 0
    t.decimal  "random",                            null: false
    t.integer  "retired_workflow_ids", default: [],              array: true
  end

{'fraction_non_alphanumeric': 0.11055276381909548, 'fraction_numerical': 0.002656962975798533, 'mean_word_length': 3.4112101910828025, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4458069', 'n_tokens_mistral': 5748, 'n_tokens_neox': 5597, 'n_words': 1456}