adds phoenix boilerplate and database api

- message communication added
- database migration added
- initial commit
This commit is contained in:
2021-12-05 00:36:13 +01:00
commit 4e607a7e45
50 changed files with 1817 additions and 0 deletions

View File

@ -0,0 +1,4 @@
[
import_deps: [:ecto_sql],
inputs: ["*.exs"]
]

View File

@ -0,0 +1,14 @@
defmodule Bump.Repo.Migrations.AddMessages do
use Ecto.Migration
def change do
create table :messages do
add :sender, :string, size: 255, null: false
add :data, :string, size: 2048
add :timestamp, :utc_datetime, null: false
timestamps([type: :utc_datetime])
end
end
end

11
priv/repo/seeds.exs Normal file
View 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:
#
# Bump.Repo.insert!(%Bump.SomeSchema{})
#
# We recommend using the bang functions (`insert!`, `update!`
# and so on) as they will fail if something goes wrong.