<commit_before>import {createClass} from "react"
import {h} from "react-markup"
import {Router, Route, hashHistory} from "react-router"

import {login, logout, user} from "./api"
import Navigation from "./navigation"
import Auth from "./auth"
import TableView from "./table-view"
import DataAccess from "./data-access"

const scheme = [
    {
        name: "translation-strings",
        attrs: [
            {name: "id", type: "int"},
            {name: "en-US", type: "string"},
            {name: "es-ES", type: "string"},
            {name: "ru-RU", type: "string"},
        ],
    },
    {
        name: "translation-texts",
        attrs: [
            {name: "id", type: "int"},
            {name: "en-US", type: "text"},
            {name: "es-ES", type: "text"},
            {name: "ru-RU", type: "text"},
        ],
    },
    {
        name: "members",
        attrs: [
            {name: "id", type: "int"},
            {name: "name", type: "manyToOne", manyToOne: {
                to: "translation-strings",
                fromAttr: "name_id",
                toAttr: "id",
            }},
            {name: "role", type: "manyToOne", manyToOne: {
                to: "translation-strings",
                fromAttr: "role_id",
                toAttr: "id",
            }},
            {name: "photo_url", type: "string"},
            {name: "vk", type: "string"},
            {name: "fb", type: "string"},
            {name: "linked_in", type: "string"},
            {name: "email", type: "string"},
        ],
    },
    {
        name: "news-items",
        attrs: [
            {name: "id", type: "int"},
            {name: "date", type: "date"},
            {name: "title", type: "manyToOne", manyToOne: {
                to: "translation-strings",
                fromAttr: "title_id",
                toAttr: "id",
            }},
            {name: "text", type: "manyToOne", manyToOne: {
                to: "translation-texts",
                fromAttr: "text_id",
                toAttr: "id",
            }},
            {name: "image_url", type: "string"},
            {name: "tags", type: "manyToMany", manyToMany: {
                via: "news-news-tags",
                to: "news-tags",
                fromAttr: "news_id",
                toAttr: "news_tags_id",
            }},
        ],
    },
    {
        name: "news-tags",
        attrs: [
            {name: "id", type: "int"},
            {name: "title", type: "manyToOne", manyToOne: {
                to: "translation-strings",
                fromAttr: "title_id",
                toAttr: "id",
            }},
            {name: "news", type: "manyToMany", manyToMany: {
                via: "news-news-tags",
                to: "news-items",
                fromAttr: "news_tags_id",
                toAttr: "news_id",
            }},
        ],
    },
    {
        name: "news-news-tags",
        attrs: [
            {name: "id", type: "int"},
            {name: "news_id", type: "int"},
            {name: "news_item", type: "manyToOne", manyToOne: {
                to: "news-items",
                fromAttr: "news_id",
                toAttr: "id",
            }},
            {name: "tag", type: "manyToOne", manyToOne: {
                to: "news-tags",
                fromAttr: "news_tags_id",
                toAttr: "id",
            }},
            {name: "news_tags_id", type: "int"},
        ],
    },
]

const expandings = {
    "translation-strings": [],
    "translation-texts": [],
    "members": [
        "name",
        "role",
    ],
    "news-items": [
        "title",
        "text",
        ["tags", [
            "title",<commit_msg>Add extendings for news tags<commit_after>import {createClass} from "react"
import {h} from "react-markup"
import {Router, Route, hashHistory} from "react-router"

import {login, logout, user} from "./api"
import Navigation from "./navigation"
import Auth from "./auth"
import TableView from "./table-view"
import DataAccess from "./data-access"

const scheme = [
    {
        name: "translation-strings",
        attrs: [
            {name: "id", type: "int"},
            {name: "en-US", type: "string"},
            {name: "es-ES", type: "string"},
            {name: "ru-RU", type: "string"},
        ],
    },
    {
        name: "translation-texts",
        attrs: [
            {name: "id", type: "int"},
            {name: "en-US", type: "text"},
            {name: "es-ES", type: "text"},
            {name: "ru-RU", type: "text"},
        ],
    },
    {
        name: "members",
        attrs: [
            {name: "id", type: "int"},
            {name: "name", type: "manyToOne", manyToOne: {
                to: "translation-strings",
                fromAttr: "name_id",
                toAttr: "id",
            }},
            {name: "role", type: "manyToOne", manyToOne: {
                to: "translation-strings",
                fromAttr: "role_id",
                toAttr: "id",
            }},
            {name: "photo_url", type: "string"},
            {name: "vk", type: "string"},
            {name: "fb", type: "string"},
            {name: "linked_in", type: "string"},
            {name: "email", type: "string"},
        ],
    },
    {
        name: "news-items",
        attrs: [
            {name: "id", type: "int"},
            {name: "date", type: "date"},
            {name: "title", type: "manyToOne", manyToOne: {
                to: "translation-strings",
                fromAttr: "title_id",
                toAttr: "id",
            }},
            {name: "text", type: "manyToOne", manyToOne: {
                to: "translation-texts",
                fromAttr: "text_id",
                toAttr: "id",
            }},
            {name: "image_url", type: "string"},
            {name: "tags", type: "manyToMany", manyToMany: {
                via: "news-news-tags",
                to: "news-tags",
                fromAttr: "news_id",
                toAttr: "news_tags_id",
            }},
        ],
    },
    {
        name: "news-tags",
        attrs: [
            {name: "id", type: "int"},
            {name: "title", type: "manyToOne", manyToOne: {
                to: "translation-strings",
                fromAttr: "title_id",
                toAttr: "id",
            }},
            {name: "news", type: "manyToMany", manyToMany: {
                via: "news-news-tags",
                to: "news-items",
                fromAttr: "news_tags_id",
                toAttr: "news_id",
            }},
        ],
    },
    {
        name: "news-news-tags",
        attrs: [
            {name: "id", type: "int"},
            {name: "news_id", type: "int"},
            {name: "news_item", type: "manyToOne", manyToOne: {
                to: "news-items",
                fromAttr: "news_id",
                toAttr: "id",
            }},
            {name: "tag", type: "manyToOne", manyToOne: {
                to: "news-tags",
                fromAttr: "news_tags_id",
                toAttr: "id",
            }},
            {name: "news_tags_id", type: "int"},
        ],
    },
]

const expandings = {
    "translation-strings": [],
    "translation-texts": [],
    "members": [
        "name",
        "role",
    ],
    "news-tags": [
        "title",
        ["news", [
            "title",
            "text",
        ]],
    ],
    "news-items": [
        "title",
        "text",
        ["tags", [
            "title",
{'fraction_non_alphanumeric': 0.174496644295302, 'fraction_numerical': 0.0, 'mean_word_length': 1.3526997158193874, 'pattern_counts': {'":': 9, '<': 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': '4354340', 'n_tokens_mistral': 2316, 'n_tokens_neox': 2230, 'n_words': 518}