You may work on this assignment as a group.
If anything does not work as described here,
notify the instructor immediately.
Do one of the following tasks.
drop_all_fkey_constraints_mysql.php,
which drops all the foreign-key constraints in a MySQL
database.
generate_fkey_constraints.php.
function get_constraint_names() {
global $db;
// code similar to the body of function referenced_tables($table_name)
// defined in file db_mysql.inc in ms_apps_cs440/framework_v3
// return an array of constraint names
}
// execute a "drop foreign key" statement for each constraint name
// with $db->query($sql)
drop_all_fkey_constraints_pgsql.php
for a PostgreSQL database.
Refer to db_pgsql.inc.
cp ~minourax/public_html/symfony/sf_zencart_pg .The migration script performs the following operations.
databases.yml and propel.ini
in directory config for the MySQL database.
Unix utility program sed can be used for this purpose.
config/shcema.yml
with command
symfony propel-build-schema
databases.yml and propel.ini
with the ones for the PostgreSQL database.
data/sql/schma.sql for PostgreSQL
with command
symfony propel-build-sql
data/sql/generated-schema.sql can be executed
on the PostgreSQL database.
./symfony cc rm lib/* rm lib/model/om/* rm lib/model/map/* cp config/databases.yml.mysql config/databases.yml cp config/propel.ini.mysql config/propel.ini ./symfony propel-build-schema mv config/schema.yml config/schema.yml.bak sed -e '/0001-01-01/d' < config/schema.yml.bak >config/schema.yml # The above steps are to avoid the following error # Unable to parse default value as date/time value: # '0001-01-011 00:00:00' # Remove from schema.yml lines line containing # default: 0001-01-0 # There are three types of these lines. ./symfony propel-build-model ./symfony propel-build-sql ./symfony propel-dump-data frontend zencart_dump.yml # Now, work with for the PostgreSQL database ./symfony cc cp config/databases.yml.pgsql config/databases.yml cp config/propel.ini.pgsql config/propel.ini ./symfony propel-build-model ./symfony propel-load-data frontend zencart_dump.yml
/var/trac/README.TM:
cd /var/trac mkdir /var/svn # create SVN project directory ms_apps svnadmin create /var/svn/ms_apps # create PostgreSQL database named trac_ms_apps # create user trac_ms_apps password 'xxxxx'; # create database user trac_ms_apps; # grant all on database trac_ms_apps to trac_ms_apps; # creat ea new Trac environment at /var/trac/ms_apps trac-admin ms_apps initenv # Project Name [My Project]> ms_apps # Database connection string [sqlite:db/trac.db]> # postgres://trac_ms_apps:CSxyz540@localhost/trac_ms_apps # Path to repository [/var/svn/test]> /var/svn/ms_apps # Templates directory [/usr/share/trac/templates]> # configure the environment by editing the file: # /var/trac/ms_apps/conf/trac.ini # run the Trac standalone web server `tracd`: tracd --port 8000 /var/trac/ms_apps
http://localhost:8000/ms_apps,
and add the data on the student projects.
tracd to be started, stopped, and restarted
with command /etc/init.d/tracd ....
http://projects.edgewall.com/trac/