<commit_before>from datetime import datetime
import sqlalchemy
from sqlalchemy.types import *
from flask.ext.sqlalchemy import SQLAlchemy
from sqlalchemy.sql.functions import current_date
from sqlalchemy.dialects.postgresql import ARRAY
from splice.environment import Environment

db = Environment.instance().db

class Country(db.Model):
    __tablename__ = "countries"

    id = db.Column(db.Integer(), autoincrement=True, primary_key=True)
    code = db.Column(db.String(2), unique=True)
    name = db.Column(db.String(100), nullable=False, unique=True)

class Locale(db.Model):
    __tablename__ = "locales"
    id = db.Column(db.Integer(), autoincrement=True, primary_key=True)
    locale = db.Column(db.String(14), unique=True)

class Company(db.Model):
    __tablename__ = "companies"

    id = db.Column(db.Integer(), autoincrement=True, primary_key=True)
    name = db.Column(db.String(255))
    created_at = db.Column(db.DateTime(), nullable=False, default=datetime.utcnow)

    campaigns = db.relationship("Campaign")

class CampaignsLocales(db.Model):
    __tablename__ = "campaigns_locales"
<commit_msg>rename locale table 'locale' column to 'name'<commit_after>from datetime import datetime
import sqlalchemy
from sqlalchemy.types import *
from flask.ext.sqlalchemy import SQLAlchemy
from sqlalchemy.sql.functions import current_date
from sqlalchemy.dialects.postgresql import ARRAY
from splice.environment import Environment

db = Environment.instance().db

class Country(db.Model):
    __tablename__ = "countries"

    id = db.Column(db.Integer(), autoincrement=True, primary_key=True)
    code = db.Column(db.String(2), unique=True)
    name = db.Column(db.String(100), nullable=False, unique=True)

class Locale(db.Model):
    __tablename__ = "locales"
    id = db.Column(db.Integer(), autoincrement=True, primary_key=True)
    name = db.Column(db.String(14), unique=True)

class Company(db.Model):
    __tablename__ = "companies"

    id = db.Column(db.Integer(), autoincrement=True, primary_key=True)
    name = db.Column(db.String(255))
    created_at = db.Column(db.DateTime(), nullable=False, default=datetime.utcnow)

    campaigns = db.relationship("Campaign")

class CampaignsLocales(db.Model):
    __tablename__ = "campaigns_locales"

{'fraction_non_alphanumeric': 0.11858407079646018, 'fraction_numerical': 0.007964601769911504, 'mean_word_length': 5.160762942779291, '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': '3989015', 'n_tokens_mistral': 769, 'n_tokens_neox': 731, 'n_words': 152}