Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20210729081351_create_topics.rb')
-rw-r--r--db/migrate/20210729081351_create_topics.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20210729081351_create_topics.rb b/db/migrate/20210729081351_create_topics.rb
new file mode 100644
index 00000000000..c6fdc6bb98a
--- /dev/null
+++ b/db/migrate/20210729081351_create_topics.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class CreateTopics < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ def change
+ create_table_with_constraints :topics do |t|
+ t.text :name, null: false
+ t.text_limit :name, 255
+
+ t.index :name, unique: true
+
+ t.timestamps_with_timezone
+ end
+ end
+end