[Ovirt-devel] [PATCH server] Changed the database configuration to use a different database for development

Darryl L. Pierce dpierce at redhat.com
Mon Oct 20 19:09:59 UTC 2008


Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
 scripts/ovirt-server-install |    2 +-
 src/config/database.yml      |   21 +++++++++++++++++----
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/scripts/ovirt-server-install b/scripts/ovirt-server-install
index cd921f7..055ff4c 100755
--- a/scripts/ovirt-server-install
+++ b/scripts/ovirt-server-install
@@ -186,7 +186,7 @@ touch $EXISTS_FILE
 
 cd ${OVIRT_DIR}
 mkdir -p log
-rake db:migrate
+export RAILS_ENV="production" && rake db:migrate
 cd -
 
 ${OVIRT_DIR}/script/grant_admin_privileges ovirtadmin
diff --git a/src/config/database.yml b/src/config/database.yml
index c60ee8f..497eb26 100644
--- a/src/config/database.yml
+++ b/src/config/database.yml
@@ -5,16 +5,29 @@
 #   sudo /sbin/service postgresql initdb
 #   sudo /sbin/service postgresql start
 #   sudo su - postgres
-#   $   createdb ovirt
 #   $   psql ovirt
 #   $-# CREATE USER ovirt WITH PASSWORD 'v23zj59an';
-#   $-# CREATE DATABASE ovirt;
-#   $-# GRANT ALL PRIVILEGES ON DATABASE ovirt to ovirt;
+#   $-# CREATE DATABASE ovirt_development;
+#   $-# GRANT ALL PRIVILEGES ON DATABASE ovirt_development to ovirt;
 #   $-# CREATE DATABASE ovirt_test;
 #   $-# GRANT ALL PRIVILEGES ON DATABASE ovirt_test to ovirt;
+#   $-# CREATE DATABASE ovirt;
+#   $-# GRANT ALL PRIVILEGES ON DATABASE ovirt to ovirt;
 #   $-# \q
 #   $   exit
 #
+# To start off a new environment, use the following commands:
+#
+#   rake db:drop:all
+#   rake db:create:all
+#   rake db:migrate
+#   rake db:tests:prepare
+#
+# And when there are changes to the database, simple run:
+#
+#   rake db:migrate
+#   rake db:test:prepare
+#
 #   On a local system you may need to edit this file to have only the following
 #   /var/lib/pgsql/data/pg_hba.conf
 #   local all all trust
@@ -23,7 +36,7 @@
 
 development:
   adapter: postgresql
-  database: ovirt
+  database: ovirt_development
   username: ovirt
   password: v23zj59an
   host: localhost
-- 
1.5.5.1




More information about the ovirt-devel mailing list