chore: generate resources for pastes
Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
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
|
||||
Reference in new issue
Block a user