feat: add github repository

This commit is contained in:
Adrien Waksberg 2018-07-29 21:06:32 +02:00
parent 5154b4b632
commit d2b621ddd6
16 changed files with 172 additions and 3 deletions

View file

@ -0,0 +1,7 @@
class AddColumnRepositoryTypeInSoftware < ActiveRecord::Migration[5.2]
def change
change_table :softwares do |t|
t.string :repository_type
end
end
end

View file

@ -0,0 +1,10 @@
class CreateGithubRepositories < ActiveRecord::Migration[5.2]
def change
create_table :github_repositories do |t|
t.string :name, uniqueness: true, null: false
t.references :software, uniqueness: true, foreign_key: true
t.timestamps
end
end
end

View file

@ -10,13 +10,22 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2018_07_22_183046) do
ActiveRecord::Schema.define(version: 2018_07_29_191829) do
create_table "github_repositories", force: :cascade do |t|
t.string "name", null: false
t.integer "software_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["software_id"], name: "index_github_repositories_on_software_id"
end
create_table "softwares", force: :cascade do |t|
t.string "name", null: false
t.string "website"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "repository_type"
end
create_table "versions", force: :cascade do |t|