- Read every row in the table
- No reading of index. Reading from indexes is also expensive.
defmodule MyAppAPI.ReleaseTasks do | |
alias Ecto.Migrator | |
@otp_app :myapp_api | |
@start_apps [:logger, :ssl, :postgrex, :ecto] | |
def migrate do | |
init(@otp_app, @start_apps) | |
run_migrations_for(@otp_app) |
The standard names for indexes in PostgreSQL are:
{tablename}_{columnname(s)}_{suffix}
where the suffix is one of the following:
pkey
for a Primary Key constraint;key
for a Unique constraint;excl
for an Exclusion constraint;idx
for any other kind of index;
- Install Elixir: http://elixir-lang.org/install.html
- Install Phoenix http://www.phoenixframework.org/docs/installation
sudo apt-get install inotify-tools #ubuntu
sudo apt-get install postgresql #Ubuntu
mix local.hex #install hex
mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez #phoenix archive
use Mix.Config | |
# We don't run a server during test. If one is required, | |
# you can enable the server option below. | |
config :hello_phoenix, HelloPhoenix.Endpoint, | |
http: [port: 4001], | |
server: false | |
# Print only warnings and errors during test | |
config :logger, level: :warn |
Name: Flash | |
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc= | |
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676 | |
Thank you! |
Введение
Начать стоит отсюда. Не пугайтесь то, что это книга по незнакомой OS, эти термины практически везде одинаковые и здесь они изложены в понятной для начинающих форме.
http://www.qnx.com/developers/docs/6.4.1/neutrino/getting_started/s1_procs.html
Прочесть нужно треть главы до подраздела "Starting a process", если С не пугает, читайте полностью. После прочтения вы будете понимать, что такое process, thread, mutex, priorites, semaphores, scheduler, contex-switch, kernel states.
Ruby
This runs a build for a small elixir (phoenix) project in about 40 seconds by caching as much of the compiled files as possible.
We've been using this for months in multiple projects without any issues. Please ping be if there is any issues with this script and I'll update it.
It should be generic enough to work on any elixir app using mix.
If you have a elixir_buildpack.config
, then enable that section in the build script to keep versions in sync!