diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-04 18:36:22 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-04 18:36:22 +0300 |
commit | bcc4e4dc7ed0740e92a61fc82c3c669f8f2d8d30 (patch) | |
tree | 1df3e2d68cd524af4dce107b2e4227778bb3945d /db | |
parent | 211e435ade337c968fab11c52427c172adcec99a (diff) | |
parent | e0af7cefb4c92b474d14116b40927d70c13e78cc (diff) | |
download | gitlab-ce-bcc4e4dc7ed0740e92a61fc82c3c669f8f2d8d30.tar.gz |
Merge branch 'gist' of https://github.com/Andrew8xx8/gitlabhq into Andrew8xx8-gist
Conflicts:
Gemfile.lock
app/models/ability.rb
app/models/project.rb
app/views/snippets/_form.html.haml
db/schema.rb
features/steps/shared/paths.rb
spec/factories.rb
spec/models/project_spec.rb
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20130323174317_add_private_to_snippets.rb | 5 | ||||
-rw-r--r-- | db/migrate/20130324151736_add_type_to_snippets.rb | 5 | ||||
-rw-r--r-- | db/migrate/20130324172327_change_project_id_to_null_in_snipepts.rb | 9 | ||||
-rw-r--r-- | db/migrate/20130324203535_add_type_value_for_snippets.rb | 8 | ||||
-rw-r--r-- | db/schema.rb | 10 |
5 files changed, 33 insertions, 4 deletions
diff --git a/db/migrate/20130323174317_add_private_to_snippets.rb b/db/migrate/20130323174317_add_private_to_snippets.rb new file mode 100644 index 00000000000..92f3a5c7011 --- /dev/null +++ b/db/migrate/20130323174317_add_private_to_snippets.rb @@ -0,0 +1,5 @@ +class AddPrivateToSnippets < ActiveRecord::Migration + def change + add_column :snippets, :private, :boolean, null: false, default: true + end +end diff --git a/db/migrate/20130324151736_add_type_to_snippets.rb b/db/migrate/20130324151736_add_type_to_snippets.rb new file mode 100644 index 00000000000..276aab2ca15 --- /dev/null +++ b/db/migrate/20130324151736_add_type_to_snippets.rb @@ -0,0 +1,5 @@ +class AddTypeToSnippets < ActiveRecord::Migration + def change + add_column :snippets, :type, :string + end +end diff --git a/db/migrate/20130324172327_change_project_id_to_null_in_snipepts.rb b/db/migrate/20130324172327_change_project_id_to_null_in_snipepts.rb new file mode 100644 index 00000000000..4c992bac4d1 --- /dev/null +++ b/db/migrate/20130324172327_change_project_id_to_null_in_snipepts.rb @@ -0,0 +1,9 @@ +class ChangeProjectIdToNullInSnipepts < ActiveRecord::Migration + def up + change_column :snippets, :project_id, :integer, :null => true + end + + def down + change_column :snippets, :project_id, :integer, :null => false + end +end diff --git a/db/migrate/20130324203535_add_type_value_for_snippets.rb b/db/migrate/20130324203535_add_type_value_for_snippets.rb new file mode 100644 index 00000000000..8c05dd2cc71 --- /dev/null +++ b/db/migrate/20130324203535_add_type_value_for_snippets.rb @@ -0,0 +1,8 @@ +class AddTypeValueForSnippets < ActiveRecord::Migration + def up + Snippet.where("project_id IS NOT NULL").update_all(type: 'ProjectSnippet') + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index 6a16caf59d8..21e553dd612 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -203,12 +203,14 @@ ActiveRecord::Schema.define(:version => 20130522141856) do create_table "snippets", :force => true do |t| t.string "title" t.text "content" - t.integer "author_id", :null => false - t.integer "project_id", :null => false - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.integer "author_id", :null => false + t.integer "project_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.string "file_name" t.datetime "expires_at" + t.boolean "private", :default => true, :null => false + t.string "type" end add_index "snippets", ["created_at"], :name => "index_snippets_on_created_at" |