You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added a check to bin/mkrelease, preventing releases with both schema change migrations and data migrations. Data migrations often take some time, which will delay the time between the schema changes and deployment of the matching new code.
note "Checking that changelog information is available ..."
174
+
changes=$( sed -n "/^$PROJ ($VER.*)/,/^ -- /p" changelog )
175
+
[ "$changes" ] || die "No changelog information for $VER found"
176
+
#note "$changes"
177
+
178
+
note "Checking that we don't have both schema and data migrations"
179
+
cur=$(svn info | awk '/^Revision:/ { print $2 }')
180
+
migrations=$(svn log $PWD -v -r HEAD:$((cur-100))| sed -n -e '1,/^Set version info and settings back to development mode/p'| grep '^...A /.*/migrations/0.*.py'| cut -c6- | awk '{ print $1 }'| sed -re 's|/trunk/||')
181
+
if [ -n"$migrations" ];then
182
+
datamigr=$(for m in"$migrations";do egrep -sl 'migrations\.RunPython'$m;done|| true)
183
+
schemamigr=$(for m in"$migrations";do egrep -sl 'migrations\.(Add|Alter|Create|Delete|Remove|Rename)(Field|Model|UniqueTogether)'$m;done|| true)
184
+
if [ -n"$datamigr"-a-n"$schemamigr" ];then
185
+
die "\n Found both data migrations and schema migrations in this release.\n This is likely to cause delay between schema changes and deployment,\n which means the old code will run on the new schema longer than necessary."
0 commit comments