mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
upgrade from mix.config to config
This commit is contained in:
parent
748086c01f
commit
ce4b1b1bcf
7 changed files with 11 additions and 9 deletions
|
@ -1,11 +1,11 @@
|
|||
# This file is responsible for configuring your application
|
||||
# and its dependencies with the aid of the Mix.Config module.
|
||||
# and its dependencies with the aid of the Config module.
|
||||
#
|
||||
# This configuration file is loaded before any dependency and
|
||||
# is restricted to this project.
|
||||
|
||||
# General application configuration
|
||||
use Mix.Config
|
||||
import Config
|
||||
|
||||
config :philomena,
|
||||
ecto_repos: [Philomena.Repo],
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use Mix.Config
|
||||
import Config
|
||||
|
||||
# Configure your database
|
||||
config :philomena, Philomena.Repo,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use Mix.Config
|
||||
import Config
|
||||
|
||||
# For production, don't forget to configure the url host
|
||||
# to something meaningful, Phoenix uses this information
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# from environment variables. You can also hardcode secrets,
|
||||
# although such is generally not recommended and you have to
|
||||
# remember to add this file to your .gitignore.
|
||||
use Mix.Config
|
||||
import Config
|
||||
|
||||
database_url =
|
||||
System.get_env("DATABASE_URL") ||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use Mix.Config
|
||||
import Config
|
||||
|
||||
# Configure your database
|
||||
config :philomena, Philomena.Repo,
|
||||
|
|
|
@ -25,7 +25,9 @@ defmodule Philomena.Commissions.Commission do
|
|||
@doc false
|
||||
def changeset(commission, attrs) do
|
||||
commission
|
||||
|> cast(attrs, [])
|
||||
|> validate_required([])
|
||||
|> cast(attrs, [:information, :contact, :will_create, :will_not_create, :open, :sheet_image_id, :categories])
|
||||
|> validate_required([:user, :information, :contact, :open])
|
||||
|> validate_length(:information, max: 700, count: :bytes)
|
||||
|> validate_length(:contact, max: 700, count: :bytes)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@ alias Philomena.Tags
|
|||
import Ecto.Query
|
||||
|
||||
IO.puts "---- Creating Elasticsearch indices"
|
||||
for model <- [Image, Comment, Gallery, Tag, Post, Report] do # Report
|
||||
for model <- [Image, Comment, Gallery, Tag, Post, Report] do
|
||||
model.delete_index!
|
||||
model.create_index!
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue