mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-10 07:50:33 -07:00
adding slugs to schools and categories
This commit is contained in:
parent
683fc31c5d
commit
1db61cd3e5
13 changed files with 42 additions and 12 deletions
6
db/migrate/20170316194058_add_slug_to_school.rb
Normal file
6
db/migrate/20170316194058_add_slug_to_school.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class AddSlugToSchool < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
add_column :schools, :slug, :string
|
||||
add_index :schools, :slug, unique: true
|
||||
end
|
||||
end
|
||||
6
db/migrate/20170316194122_add_slug_to_category.rb
Normal file
6
db/migrate/20170316194122_add_slug_to_category.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
class AddSlugToCategory < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
add_column :categories, :slug, :string
|
||||
add_index :categories, :slug, unique: true
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170316154053) do
|
||||
ActiveRecord::Schema.define(version: 20170316194122) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
|
@ -40,6 +40,8 @@ ActiveRecord::Schema.define(version: 20170316154053) do
|
|||
t.integer "parent_category_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "slug"
|
||||
t.index ["slug"], name: "index_categories_on_slug", unique: true, using: :btree
|
||||
end
|
||||
|
||||
create_table "districts", force: :cascade do |t|
|
||||
|
|
@ -141,6 +143,8 @@ ActiveRecord::Schema.define(version: 20170316154053) do
|
|||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.text "description"
|
||||
t.string "slug"
|
||||
t.index ["slug"], name: "index_schools_on_slug", unique: true, using: :btree
|
||||
end
|
||||
|
||||
create_table "users", force: :cascade do |t|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue