feat: init
This commit is contained in:
commit
b58058e19b
59 changed files with 3314 additions and 0 deletions
4
priv/repo/migrations/.formatter.exs
Normal file
4
priv/repo/migrations/.formatter.exs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[
|
||||
import_deps: [:ecto_sql],
|
||||
inputs: ["*.exs"]
|
||||
]
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
defmodule Putzplan.Repo.Migrations.InitializeAndAddAuthenticationResources do
|
||||
@moduledoc """
|
||||
Updates resources based on their most recent snapshots.
|
||||
|
||||
This file was autogenerated with `mix ash_sqlite.generate_migrations`
|
||||
"""
|
||||
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
create table(:users, primary_key: false) do
|
||||
add :id, :uuid, null: false, primary_key: true
|
||||
end
|
||||
|
||||
create table(:tokens, primary_key: false) do
|
||||
add :updated_at, :utc_datetime_usec, null: false
|
||||
add :created_at, :utc_datetime_usec, null: false
|
||||
add :extra_data, :map
|
||||
add :purpose, :text, null: false
|
||||
add :expires_at, :utc_datetime, null: false
|
||||
add :subject, :text, null: false
|
||||
add :jti, :text, null: false, primary_key: true
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
drop table(:tokens)
|
||||
|
||||
drop table(:users)
|
||||
end
|
||||
end
|
||||
11
priv/repo/seeds.exs
Normal file
11
priv/repo/seeds.exs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Script for populating the database. You can run it as:
|
||||
#
|
||||
# mix run priv/repo/seeds.exs
|
||||
#
|
||||
# Inside the script, you can read and write to any of your
|
||||
# repositories directly:
|
||||
#
|
||||
# Putzplan.Repo.insert!(%Putzplan.SomeSchema{})
|
||||
#
|
||||
# We recommend using the bang functions (`insert!`, `update!`
|
||||
# and so on) as they will fail if something goes wrong.
|
||||
Loading…
Add table
Add a link
Reference in a new issue