<commit_before><commit_msg>Add migrations for administrative divisions<commit_after>export async function up(knex, Promise) {
  await knex.schema.createTable('geonames_admin1', function (table) {
    table.increments();
    table.string('name');
    table.string('asciiname');
    table.string('code');
    table.string('country_code');
    table.index('code');
  });

  await knex.schema.table('geotags', function (table) {
    table.string('country_code');
    table.string('admin1_code');
    table.uuid('admin1_id')
      .references('id').inTable('geotags');
    table.integer('geonames_admin1_id')
      .references('id').inTable('geonames_admin1');
  });
}

export async function down(knex, Promise) {
  await knex.schema.table('geotags', function (table) {
    table.dropColumn('country_code');
    table.dropColumn('admin1_code');
    table.dropColumn('admin1_id');
    table.dropColumn('geonames_admin1_id');
  });

  await knex.schema.dropTable('geonames_admin1');
}
{'fraction_non_alphanumeric': 0.1647901740020471, 'fraction_numerical': 0.009211873080859774, 'mean_word_length': 4.927272727272728, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4537122', 'n_tokens_mistral': 316, 'n_tokens_neox': 318, 'n_words': 44}