Skip to content

Commit

Permalink
Merge pull request #46453 from code-dot-org/add-data-guide-model
Browse files Browse the repository at this point in the history
Add data guide model
  • Loading branch information
Meg Crenshaw committed May 31, 2022
2 parents 3ad211b + a480db1 commit 49af967
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
18 changes: 18 additions & 0 deletions dashboard/app/models/data_doc.rb
@@ -0,0 +1,18 @@
# == Schema Information
#
# Table name: data_docs
#
# id :bigint not null, primary key
# key :string(255) not null
# name :string(255)
# content :text(65535)
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_data_docs_on_key (key) UNIQUE
# index_data_docs_on_name (name)
#
class DataDoc < ApplicationRecord
end
10 changes: 10 additions & 0 deletions dashboard/db/migrate/20220525181706_create_data_docs.rb
@@ -0,0 +1,10 @@
class CreateDataDocs < ActiveRecord::Migration[6.0]
def change
create_table :data_docs do |t|
t.string :key, null: false, index: {unique: true}
t.string :name, index: true
t.text :content
t.timestamps
end
end
end
10 changes: 10 additions & 0 deletions dashboard/db/schema.rb
Expand Up @@ -475,6 +475,16 @@
t.index ["name"], name: "index_courses_on_name"
end

create_table "data_docs", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t|
t.string "key", null: false
t.string "name"
t.text "content"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["key"], name: "index_data_docs_on_key", unique: true
t.index ["name"], name: "index_data_docs_on_name"
end

create_table "donor_schools", id: :integer, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci", force: :cascade do |t|
t.string "name"
t.string "nces_id"
Expand Down

0 comments on commit 49af967

Please sign in to comment.