chore: generate resources for pastes

Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
sphericalkat committed 2021-08-12 03:28:28 +05:30
1 parent 5a7bece725
commit 99ad54cf68
13 files changed
+431

No files matched your search

@@ -0,0 +1,14 @@
defmodule Ketbin.Repo.Migrations.CreatePastes do
use Ecto.Migration
def change do
create table(:pastes, primary_key: false) do
add :id, :string, primary_key: true
add :is_url, :boolean, default: false, null: false
add :content, :text, null: false
add :belongs_to, references(:users, on_delete: :delete_all)
end
create index(:pastes, [:belongs_to])
end
end