about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20201008202037_create_ip_blocks.rb12
-rw-r--r--db/migrate/20201008220312_add_sign_up_ip_to_users.rb5
2 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20201008202037_create_ip_blocks.rb b/db/migrate/20201008202037_create_ip_blocks.rb
new file mode 100644
index 000000000..32acd6ede
--- /dev/null
+++ b/db/migrate/20201008202037_create_ip_blocks.rb
@@ -0,0 +1,12 @@
+class CreateIpBlocks < ActiveRecord::Migration[5.2]
+  def change
+    create_table :ip_blocks do |t|
+      t.inet :ip, null: false, default: '0.0.0.0'
+      t.integer :severity, null: false, default: 0
+      t.datetime :expires_at
+      t.text :comment, null: false, default: ''
+
+      t.timestamps
+    end
+  end
+end
diff --git a/db/migrate/20201008220312_add_sign_up_ip_to_users.rb b/db/migrate/20201008220312_add_sign_up_ip_to_users.rb
new file mode 100644
index 000000000..66cd624bb
--- /dev/null
+++ b/db/migrate/20201008220312_add_sign_up_ip_to_users.rb
@@ -0,0 +1,5 @@
+class AddSignUpIpToUsers < ActiveRecord::Migration[5.2]
+  def change
+    add_column :users, :sign_up_ip, :inet
+  end
+end