#345: updated migrations
This commit is contained in:
parent
cc368808cc
commit
a29befe18c
|
@ -3,7 +3,7 @@ class CreateContainers < ActiveRecord::Migration
|
|||
create_table :containers do |t|
|
||||
t.string :name, null: false
|
||||
t.integer :project_id, null: false
|
||||
t.integer :owner_id, null: false
|
||||
t.integer :owner_id, null: false, references: nil
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class CreateBuildLists < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :build_lists, force: true do |t|
|
||||
t.integer :bs_id
|
||||
t.integer :bs_id, references: nil
|
||||
t.string :container_path
|
||||
t.integer :status
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ class CreateGroups < ActiveRecord::Migration
|
|||
def self.up
|
||||
create_table :groups do |t|
|
||||
t.string :name
|
||||
t.integer :owner_id
|
||||
t.integer :owner_id, references: nil
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
|
|
@ -3,8 +3,8 @@ class CreateAutoBuildLists < ActiveRecord::Migration
|
|||
create_table :auto_build_lists do |t|
|
||||
t.integer :project_id
|
||||
t.integer :arch_id
|
||||
t.integer :pl_id
|
||||
t.integer :bpl_id
|
||||
t.integer :pl_id, references: nil
|
||||
t.integer :bpl_id, references: nil
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class CreateIssues < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :issues do |t|
|
||||
t.integer :serial_id
|
||||
t.integer :serial_id, references: nil
|
||||
t.integer :project_id
|
||||
t.integer :user_id
|
||||
t.string :title
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class CreateComments < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :comments do |t|
|
||||
t.integer :commentable_id
|
||||
t.integer :commentable_id, references: nil
|
||||
t.string :commentable_type
|
||||
t.integer :user_id
|
||||
t.text :body
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class CreateSubscribes < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :subscribes do |t|
|
||||
t.integer :subscribeable_id
|
||||
t.integer :subscribeable_id, references: nil
|
||||
t.string :subscribeable_type
|
||||
t.integer :user_id
|
||||
t.timestamps
|
||||
|
|
|
@ -7,8 +7,8 @@ class RemoveAutoBuildList < ActiveRecord::Migration
|
|||
create_table :auto_build_lists, force: true do |t|
|
||||
t.integer "project_id"
|
||||
t.integer "arch_id"
|
||||
t.integer "pl_id"
|
||||
t.integer "bpl_id"
|
||||
t.integer "pl_id", references: nil
|
||||
t.integer "bpl_id", references: nil
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ class RemoveContainersAndRpms < ActiveRecord::Migration
|
|||
create_table "containers" do |t|
|
||||
t.string "name", null: false
|
||||
t.integer "project_id", null: false
|
||||
t.integer "owner_id", null: false
|
||||
t.integer "owner_id", null: false, references: nil
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
|
|
@ -2,8 +2,8 @@ class CreatePullRequests < ActiveRecord::Migration
|
|||
def change
|
||||
create_table :pull_requests do |t|
|
||||
t.integer :issue_id, null: false
|
||||
t.integer :base_project_id, null: false
|
||||
t.integer :head_project_id, null: false
|
||||
t.integer :base_project_id, null: false, references: nil
|
||||
t.integer :head_project_id, null: false, references: nil
|
||||
t.string :base_ref, null: false
|
||||
t.string :head_ref, null: false
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ class CreateKeyPairs < ActiveRecord::Migration
|
|||
create_table :key_pairs do |t|
|
||||
t.integer :repository_id
|
||||
t.integer :user_id
|
||||
t.integer :key_id
|
||||
t.integer :key_id, references: nil
|
||||
t.string :public
|
||||
t.timestamps
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@ class CreateProjectTagsTable < ActiveRecord::Migration
|
|||
t.string :commit_id
|
||||
t.string :sha1
|
||||
t.string :tag_name
|
||||
t.integer :format_id
|
||||
t.integer :format_id, references: nil
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,10 +2,10 @@ class CreateTokens < ActiveRecord::Migration
|
|||
|
||||
def change
|
||||
create_table :tokens do |t|
|
||||
t.integer :subject_id, null: false
|
||||
t.integer :subject_id, null: false, references: nil
|
||||
t.string :subject_type, null: false
|
||||
t.integer :creator_id, null: false
|
||||
t.integer :updater_id
|
||||
t.integer :creator_id, null: false, references: nil
|
||||
t.integer :updater_id, references: nil
|
||||
t.string :status, default: 'active'
|
||||
t.text :description
|
||||
t.string :authentication_token, null: false
|
||||
|
|
Loading…
Reference in New Issue