summaryrefslogtreecommitdiff
path: root/db/migrate/20200221100514_create_users_statistics.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20200221100514_create_users_statistics.rb')
-rw-r--r--db/migrate/20200221100514_create_users_statistics.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20200221100514_create_users_statistics.rb b/db/migrate/20200221100514_create_users_statistics.rb
new file mode 100644
index 00000000000..c02e635bdd4
--- /dev/null
+++ b/db/migrate/20200221100514_create_users_statistics.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class CreateUsersStatistics < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def change
+ create_table :users_statistics do |t|
+ t.timestamps_with_timezone null: false
+ t.integer :without_groups_and_projects, null: false, default: 0
+ t.integer :with_highest_role_guest, null: false, default: 0
+ t.integer :with_highest_role_reporter, null: false, default: 0
+ t.integer :with_highest_role_developer, null: false, default: 0
+ t.integer :with_highest_role_maintainer, null: false, default: 0
+ t.integer :with_highest_role_owner, null: false, default: 0
+ t.integer :bots, null: false, default: 0
+ t.integer :blocked, null: false, default: 0
+ end
+ end
+end