Ejemplo n.º 1
0
def upgrade():
    conn = Connection(op.get_bind())

    # https://github.com/clld/wals-data/issues/50
    fpk = conn.pk(Family, 'utoaztecan')
    gname = 'California Uto-Aztecan'
    gid = slug(gname)
    gpk = conn.insert(Genus, id=gid, name=gname, icon='fffff00', family_pk=fpk)

    for oid in ['takic', 'tubatulabal']:
        opk = conn.pk(Genus, oid)
        conn.update(WalsLanguage, dict(genus_pk=gpk), genus_pk=opk)
        conn.insert(Config, key=Config.replacement_key(Genus, oid), value=gid)
        conn.delete(Genus, id=oid)

    # https://github.com/clld/wals-data/issues/49
    conn.update_name('aym', 'Aymara (Central)')
    conn.update_glottocode('aym', 'cent2142')
    conn.update_iso('aym', 'ayr', ayc='Southern Aymara')

    # https://github.com/clld/wals-data/issues/48
    # The genus Guaymi should be renamed Guaymiic.
    conn.update(Genus, dict(name='Guaymiic'), id='guaymi')

    # The genus Aruak should be renamed Arhuacic.
    conn.update(Genus, dict(name='Arhuacic'), id='aruak')

    # The language Motilón should be renamed Barí (while keeping Motilón as the name of
    # the genus).
    conn.update_name('mti', 'Barí')

    # The genus Chibchan Proper should be split into two genera, Chibcha-Duit, containing
    # the language Muisca, and Tunebo, containing the language Tunebo.
    conn.update_genus('msc', ('chibchaduit', 'Chibcha-Duit', 'fffff00'),
                      family='chibchan')
    conn.update_genus('tnb', ('tunebo', 'Tunebo', 'fffcc00'),
                      family='chibchan')
    conn.insert(Config,
                key=Config.replacement_key(Genus, 'chibchanproper'),
                value=Config.gone)
    conn.delete(Genus, id='chibchanproper')

    # https://github.com/clld/wals-data/issues/44
    conn.update_name('jlu', 'Luwo', other='Jur Luwo')

    # https://github.com/clld/wals-data/issues/43
    conn.update_genus('ctw', ('catawban', 'Catawban', 'fffcc00'),
                      family='siouan')
    conn.update(Genus, dict(name='Core Siouan'), id='siouan')

    # https://github.com/clld/wals-data/issues/40
    conn.update_source('Sumbuk-2002', year='1999', name='Sumbuk 1999')
Ejemplo n.º 2
0
def upgrade():
    conn = Connection(op.get_bind())

    # https://github.com/clld/wals-data/issues/50
    fpk = conn.pk(Family, 'utoaztecan')
    gname = 'California Uto-Aztecan'
    gid = slug(gname)
    gpk = conn.insert(Genus, id=gid, name=gname, icon='fffff00', family_pk=fpk)

    for oid in ['takic', 'tubatulabal']:
        opk = conn.pk(Genus, oid)
        conn.update(WalsLanguage, dict(genus_pk=gpk), genus_pk=opk)
        conn.insert(Config, key=Config.replacement_key(Genus, oid), value=gid)
        conn.delete(Genus, id=oid)

    # https://github.com/clld/wals-data/issues/49
    conn.update_name('aym', 'Aymara (Central)')
    conn.update_glottocode('aym', 'cent2142')
    conn.update_iso('aym', 'ayr', ayc='Southern Aymara')

    # https://github.com/clld/wals-data/issues/48
    # The genus Guaymi should be renamed Guaymiic.
    conn.update(Genus, dict(name='Guaymiic'), id='guaymi')

    # The genus Aruak should be renamed Arhuacic.
    conn.update(Genus, dict(name='Arhuacic'), id='aruak')

    # The language Motilón should be renamed Barí (while keeping Motilón as the name of
    # the genus).
    conn.update_name('mti', 'Barí')

    # The genus Chibchan Proper should be split into two genera, Chibcha-Duit, containing
    # the language Muisca, and Tunebo, containing the language Tunebo.
    conn.update_genus(
        'msc', ('chibchaduit', 'Chibcha-Duit', 'fffff00'), family='chibchan')
    conn.update_genus(
        'tnb', ('tunebo', 'Tunebo', 'fffcc00'), family='chibchan')
    conn.insert(
        Config, key=Config.replacement_key(Genus, 'chibchanproper'), value=Config.gone)
    conn.delete(Genus, id='chibchanproper')

    # https://github.com/clld/wals-data/issues/44
    conn.update_name('jlu', 'Luwo', other='Jur Luwo')

    # https://github.com/clld/wals-data/issues/43
    conn.update_genus('ctw', ('catawban', 'Catawban', 'fffcc00'), family='siouan')
    conn.update(Genus, dict(name='Core Siouan'), id='siouan')

    # https://github.com/clld/wals-data/issues/40
    conn.update_source('Sumbuk-2002', year='1999', name='Sumbuk 1999')
Ejemplo n.º 3
0
def upgrade():
    conn = Connection(op.get_bind())
    # https://github.com/clld/wals-data/issues/64
    conn.update_name('bnr', 'Bilinarra')
    conn.update_source(
        'Nordlinger-1990',
        description='A Sketch Grammar of Bilinarra',
        title='A Sketch Grammar of Bilinarra')

    # https://github.com/clld/wals-data/issues/63
    conn.update_name('jva', 'Karajá')
    conn.update_name('ghr', 'Bunan')

    # https://github.com/clld/wals-data/issues/59
    conn.update_genus('lrd', 'tangkic')

    # https://github.com/clld/wals-data/issues/54
    conn.update_source(
        'Schauer-and-Schauer-1958',
        name='Schauer and Schauer 1978',
        year='1978',
        year_int=1978)

    # https://github.com/clld/wals-data/issues/53
    conn.update_genus(
        'ocu', ('matlatzincan', 'Matlatzincan', 't9999ff'), family='otomanguean')

    # https://github.com/clld/wals-data/issues/47
    conn.update_name('bno', 'Waimaha')

    # https://github.com/clld/wals-data/issues/46
    conn.update_source(
        'Troike-1996',
        booktitle='Handbook of North American Indians. Volume 17: Languages')

    # https://github.com/clld/wals-data/issues/42
    conn.update_name('cos', 'Rumsien')