5 alter table media rename column endblock to endblock_old;
\r
6 alter table media add column endblock bigint;
\r
7 update media set endblock = endblock_old;
\r
8 alter table media alter column endblock set not null;
\r
9 alter table media drop column endblock_old;
\r