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 switch to bin/mkrelease to permit mixed data and schema migrations (applicable when the data migrations are as tiny and swift as schema migrations, such as when adding a new entry to a name model).
note "Checking that we don't have both schema and data migrations ..."
180
182
cur=$(svn info | awk '/^Revision:/ { print $2 }')
181
183
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/||')
182
-
if [ -n"$migrations" ];then
184
+
if [ -n"$migrations"-a-z"$PERMIT_MIGR_MIX"];then
183
185
datamigr=$(for m in"$migrations";do egrep -sl 'migrations\.RunPython'$m;done|| true)
184
186
schemamigr=$(for m in"$migrations";do egrep -sl 'migrations\.(Add|Alter|Create|Delete|Remove|Rename)(Field|Model|UniqueTogether)'$m;done|| true)
185
187
if [ -n"$datamigr"-a-n"$schemamigr" ];then
188
+
echo -e "\n Schema migrations:"
189
+
formin$schemamigr;do
190
+
echo"$m"
191
+
done
192
+
echo -e "\n Data migrations:"
193
+
formin$datamigr;do
194
+
echo"$m"
195
+
done
186
196
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