feat: add github repository
This commit is contained in:
parent
5154b4b632
commit
d2b621ddd6
16 changed files with 172 additions and 3 deletions
|
@ -0,0 +1,7 @@
|
|||
class AddColumnRepositoryTypeInSoftware < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
change_table :softwares do |t|
|
||||
t.string :repository_type
|
||||
end
|
||||
end
|
||||
end
|
10
db/migrate/20180729191829_create_github_repositories.rb
Normal file
10
db/migrate/20180729191829_create_github_repositories.rb
Normal 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
|
11
db/schema.rb
11
db/schema.rb
|
@ -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|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue