/ Published in: Bash
This shell script helps to refresh a propel schema from an existing database using (the "old") Symfony 1.2 and avoiding the "CURRENT_TIMESTAMP" (MySQL) bug.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/sh mv -f config/*.xml config/generated-schema.yml /tmp/ ./symfony propel-build-schema || exit $? in='config/schema.yml' tmp='config/schema-new.yml' chnEnTrop=', required: true, defaultValue: CURRENT_TIMESTAMP' sed -e "s/$chnEnTrop//" "$in" > "$tmp" || exit $? mv -f "$tmp" "$in" || exit $? ./symfony propel-build-model || exit $? ./symfony propel:build-forms || exit $? ./symfony propel:build-filters || exit $?