adds phoenix boilerplate and database api
- message communication added - database migration added - initial commit
This commit is contained in:
		
							
								
								
									
										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"]
 | 
			
		||||
]
 | 
			
		||||
							
								
								
									
										14
									
								
								priv/repo/migrations/20211204223854_add_messages.exs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								priv/repo/migrations/20211204223854_add_messages.exs
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										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:
 | 
			
		||||
#
 | 
			
		||||
#     Bump.Repo.insert!(%Bump.SomeSchema{})
 | 
			
		||||
#
 | 
			
		||||
# We recommend using the bang functions (`insert!`, `update!`
 | 
			
		||||
# and so on) as they will fail if something goes wrong.
 | 
			
		||||
		Reference in New Issue
	
	Block a user