diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2019-06-28 13:55:10 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2019-06-28 13:55:10 +0300 |
commit | e17edd37ab3a33d874d6ad7af92f0f5045d970c7 (patch) | |
tree | 3665d4846b9aa27bc12e22f9c50db72845187554 /db/migrate/20190613073003_create_project_aliases.rb | |
parent | 5ee5b280b05f63768f359d0b82d5edd490c0e7cd (diff) | |
parent | 2b4d755df14871a3b77bbfc219d6dd350dbc7667 (diff) |
Merge branch '3264-project-aliases-ce' into 'master'
CE port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14108
See merge request gitlab-org/gitlab-ce!29604
Diffstat (limited to 'db/migrate/20190613073003_create_project_aliases.rb')
-rw-r--r-- | db/migrate/20190613073003_create_project_aliases.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20190613073003_create_project_aliases.rb b/db/migrate/20190613073003_create_project_aliases.rb new file mode 100644 index 00000000000..5a2c2ba0cf2 --- /dev/null +++ b/db/migrate/20190613073003_create_project_aliases.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class CreateProjectAliases < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + create_table :project_aliases do |t| + t.references :project, null: false, index: true, foreign_key: { on_delete: :cascade }, type: :integer + t.string :name, null: false, index: { unique: true } + + t.timestamps_with_timezone null: false + end + end +end |