<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, unicode_literals

from peewee import Model, IntegerField, CharField

from zhihudaily.configs import Config


class BaseModel(Model):
    class Meta:
        database = Config.database


class Zhihudaily(BaseModel):
    date = IntegerField()
    json_news = CharField()
    display_date = CharField()


def create_tables():
    database.connect()
    database.create_tables([Zhihudaily])<commit_msg>Fix bug when create the datebase table<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, unicode_literals

from peewee import Model, IntegerField, CharField

from zhihudaily.configs import Config


class BaseModel(Model):
    class Meta:
        database = Config.database


class Zhihudaily(BaseModel):
    date = IntegerField()
    json_news = CharField()
    display_date = CharField()


def create_tables():
    Config.database.connect()
    Config.database.create_tables([Zhihudaily])
{'fraction_non_alphanumeric': 0.09817131857555342, 'fraction_numerical': 0.0019249278152069298, 'mean_word_length': 4.174129353233831, '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': '5246895', 'n_tokens_mistral': 326, 'n_tokens_neox': 315, 'n_words': 79}