Skip to content

Commit

Permalink
Remove delete ghost migrations option
Browse files Browse the repository at this point in the history
I dont know whose idea was to use delete ghost migrations but it was a
terrible one. We never simply delete migrations in our development and
removing them means a downgrade happened which will cause even more
trouble when we try to reapply them (because they are not there in the
first place anymore)

Ticket:	#15774
Ticket:	#15832
  • Loading branch information
william-gr committed Jun 9, 2016
1 parent 21aa783 commit 2e72132
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion gui/tools/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,6 @@ def run(self):
'/usr/local/www/freenasUI/manage.py',
'migrate',
'--merge',
'--delete-ghost-migrations'
], stdout=devnull, stderr=devnull) != 0:
self.fail('Could not restore database')
return
Expand Down
2 changes: 1 addition & 1 deletion src/freenas-installer/etc/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ menu_install()
# This should be investigated.
# chroot /tmp/data /bin/sh -c "/usr/bin/yes | \
# /usr/local/bin/python
# /usr/local/www/freenasUI/manage.py migrate --all --merge --delete-ghost-migrations"
# /usr/local/www/freenasUI/manage.py migrate --all --merge"
# Create upgrade sentinel files
: > /tmp/data/${CD_UPGRADE_SENTINEL}
: > /tmp/data/${NEED_UPDATE_SENTINEL}
Expand Down
2 changes: 1 addition & 1 deletion src/freenas/etc/ix.rc.d/ix-update
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ db_update_real()

touch /tmp/.sqlite3_ha_skip
yes | /usr/local/bin/python \
/usr/local/www/freenasUI/manage.py migrate --merge --delete-ghost-migrations > \
/usr/local/www/freenasUI/manage.py migrate --merge > \
$UPDATE_FAILED_LOG 2>&1
if [ $? -ne 0 ]; then
rm -f /tmp/.sqlite3_ha_skip
Expand Down

0 comments on commit 2e72132

Please sign in to comment.