Added additional columns to user table
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
defmodule Sukaato.Repo.Migrations.UserAddTotpSecretColumn do
|
||||||
|
use Ecto.Migration
|
||||||
|
|
||||||
|
def change do
|
||||||
|
alter table("users") do
|
||||||
|
add :totp_secret, :string
|
||||||
|
add :ltotp, :utc_datetime
|
||||||
|
add :fido_cred, :string
|
||||||
|
add :fido_key, :map
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
defmodule Sukaato.Repo.Migrations.UserAddMultifactorColumn do
|
||||||
|
use Ecto.Migration
|
||||||
|
|
||||||
|
def change do
|
||||||
|
alter table("users") do
|
||||||
|
add :multifactor, {:array, :integer}, default: [-1, -1, -1]
|
||||||
|
add :fido_priority, :integer
|
||||||
|
remove :fido_cred
|
||||||
|
add :fido_creds, {:array, :string}
|
||||||
|
remove :fido_key
|
||||||
|
add :fido_keys, {:array, :map}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
defmodule Sukaato.Repo.Migrations.UserRemoveMultifactorColumn do
|
||||||
|
use Ecto.Migration
|
||||||
|
|
||||||
|
def change do
|
||||||
|
alter table("users") do
|
||||||
|
remove :multifactor
|
||||||
|
add :fido_active, :boolean
|
||||||
|
add :totp_active, :boolean
|
||||||
|
add :fido_enabled, :boolean
|
||||||
|
add :totp_enabled, :boolean
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
defmodule Sukaato.Repo.Migrations.UserReplaceOtpfidoStatusColumns do
|
||||||
|
use Ecto.Migration
|
||||||
|
|
||||||
|
def change do
|
||||||
|
alter table("users") do
|
||||||
|
remove :fido_active
|
||||||
|
add :fido_active, :boolean, default: false
|
||||||
|
remove :totp_active
|
||||||
|
add :totp_active, :boolean, default: true
|
||||||
|
remove :fido_enabled
|
||||||
|
add :fido_enabled, :boolean, default: false
|
||||||
|
remove :totp_enabled
|
||||||
|
add :totp_enabled, :boolean, default: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
defmodule Sukaato.Repo.Migrations.UserAddUserU2fColumns do
|
||||||
|
use Ecto.Migration
|
||||||
|
|
||||||
|
def change do
|
||||||
|
alter table("users") do
|
||||||
|
add :u2f_enable, :boolean, default: false
|
||||||
|
add :u2f_priority, :integer
|
||||||
|
add :u2f_device, {:array, :map}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
defmodule Sukaato.Repo.Migrations.RemoveUserU2fColumns do
|
||||||
|
use Ecto.Migration
|
||||||
|
|
||||||
|
def change do
|
||||||
|
alter table("users") do
|
||||||
|
remove :u2f_enable
|
||||||
|
remove :u2f_priority
|
||||||
|
remove :u2f_device
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user