Commit 39d29854bb72e95d3376a8b323bce0b228cf107a

Authored by Antonio Terceiro
1 parent be0349f9

quick-start: don't wipe the development DB every time

Showing 1 changed file with 9 additions and 6 deletions   Show diff stats
script/quick-start
... ... @@ -71,21 +71,24 @@ else
71 71 fi
72 72 fi
73 73  
74   -# create the database with sample data
75 74 if test -e config/database.yml && test "$force_install" = 'false'; then
76 75 say 'Not updating existent database.yml.'
77   - say 'If you wish to automatic reconfigure your database connection, you can delete config/database.yml and run this script again.'
  76 + say 'If you wish to automatic reconfigure your database connection and'
  77 + say 'recreate the database, you can delete config/database.yml and run'
  78 + say 'this script again.'
78 79 else
  80 + # create the database with sample data
79 81 say 'Configuring Noosfero to use PostgreSQL, with your user.'
80 82 run cp config/database.yml.pgsql config/database.yml
81 83 sed -ri "s/username: noosfero/username: $USER/" config/database.yml
82 84 sudo su - postgres -c "createuser $USER --no-superuser --createdb --no-createrole"
83 85 sudo su - postgres -c "createdb noosfero_development -O $USER"
  86 +
  87 + run rake db:schema:load
  88 + run rake db:data:minimal
  89 + run rake db:test:prepare
  90 + rails runner 'Environment.default.enable("skip_new_user_email_confirmation")'
84 91 fi
85   -run rake db:schema:load
86   -run rake db:data:minimal
87   -run rake db:test:prepare
88   -rails runner 'Environment.default.enable("skip_new_user_email_confirmation")'
89 92  
90 93 # FIXME compile translations depends on ruby-gettext-rails, please see debian/control
91 94 # run rake noosfero:translations:compile
... ...