@@ -0,0 +1,892 @@
+# coding=utf-8%0A%22%22%22licence icon from static%0A%0ARevision ID: 45afa3b55cdd%0ARevises: 3dc07b38e477%0ACreate Date: 2015-04-07 17:05:22.854000%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '45afa3b55cdd'%0Adown_revision = '3dc07b38e477'%0A%0Aimport datetime%0Aimport json%0A%0Afrom alembic import op%0Aimport sqlalchemy as sa%0A%0ABEFORE = 'http://i.creativecommons.org/l/by-sa/3.0/88x31.png'%0AAFTER = 'cc-by-sa.png'%0A%0A%0Adef upgrade():%0A    conn = op.get_bind()%0A    select_jd = sa.text('SELECT jsondata FROM dataset WHERE id = :id', conn)%0A    update_jd = sa.text('UPDATE dataset SET updated = now(), '%0A        'jsondata = :jsondata WHERE id = :id', conn)%0A%0A    jd = json.loads(select_jd.scalar(id='glottolog') or '%7B%7D')%0A    icon = jd.get('license_icon')%0A    if icon == BEFORE:%0A        jd%5B'license_icon'%5D = AFTER%0A        update_jd.execute(id='glottolog', jsondata=json.dumps(jd))%0A        %0A%0Adef downgrade():%0A    pass%0A

switch to cc-license icon from static