<commit_before>require 'carto/db/migration_helper'

include Carto::Db::MigrationHelper

migration(
  Proc.new do
    create_table :api_keys do
      Uuid        :id, primary_key: true, default: 'uuid_generate_v4()'.lit
      String      :token, null: false
      foreign_key :user_id, :users, type: :uuid, on_delete: :cascade, null: false
      String      :api_type, null: false
      String      :name
      String      :grants_json, type: 'json'
      DateTime    :created_at, null: false
      DateTime    :updated_at, null: false<commit_msg>Add database config to update<commit_after>require 'carto/db/migration_helper'

include Carto::Db::MigrationHelper

migration(
  Proc.new do
    create_table :api_keys do
      Uuid        :id, primary_key: true, default: 'uuid_generate_v4()'.lit
      String      :token, null: false
      foreign_key :user_id, :users, type: :uuid, on_delete: :cascade, null: false
      String      :api_type, null: false
      String      :name
      String      :db_role, null: false
      String      :db_password, null: false
      String      :grants_json, type: 'json'
      DateTime    :created_at, null: false
      DateTime    :updated_at, null: false
{'fraction_non_alphanumeric': 0.09395973154362416, 'fraction_numerical': 0.0016778523489932886, 'mean_word_length': 2.8115015974440896, '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': '6429405', 'n_tokens_mistral': 377, 'n_tokens_neox': 376, 'n_words': 105}