<commit_before>"use strict"; 

module.exports = function(sequelize, DataTypes) {
    var taxonomy = sequelize.define('taxonomy', {
        name: {
            type: DataTypes.STRING,
            comment: "Scientific name of the recorded taxon",
            allowNull: false,
            unique: "uq_name"
        },
        ncbi: {
            type: DataTypes.INTEGER,
            comment: "Unique Identifier from the National Center for Biotechnology Information",
        },
        tsn: {
            type: DataTypes.INTEGER,
            comment: "Unique identifier from the Integrated Taxonomic Information System",
        },
        eol: {
            type: DataTypes.INTEGER,
            comment: "Unique identifier from the Encyclopedia of Life",
        },
        bold: {
            type: DataTypes.INTEGER,
            comment: "Unique identifier from the Barcode of Life Database",
        },
        status: {
            type: DataTypes.ENUM,
            values: [
                "confirmed",
                "trophic species",
                "morphospecies",
                "nomen dubium",
                "nomen oblitum",
                "nomen nudum",
                "nomen novum",
                "nomen conservandum",
                "species inquirenda"
            ],
            comment: "Status of the taxonomic validation",
            defaultValue: "confirmed",
            allowNull: false
        }
    }, {
        underscored: true,
        freezeTableName: true,
        classMethods: {
            associate: function(models) {
                taxonomy.hasMany(models.node, {
                        onDelete: 'cascade',
                        foreignKey: 'taxonomy_id'
                }),
                taxonomy.hasMany(models.trait, {
                    onDelete: 'cascade',
                    foreignKey: 'taxonomy_id'
                })
            },
        }<commit_msg>Remove delete cascade behaviour (taxo -> node)<commit_after>"use strict"; 

module.exports = function(sequelize, DataTypes) {
    var taxonomy = sequelize.define('taxonomy', {
        name: {
            type: DataTypes.STRING,
            comment: "Scientific name of the recorded taxon",
            allowNull: false,
            unique: "uq_name"
        },
        ncbi: {
            type: DataTypes.INTEGER,
            comment: "Unique Identifier from the National Center for Biotechnology Information",
        },
        tsn: {
            type: DataTypes.INTEGER,
            comment: "Unique identifier from the Integrated Taxonomic Information System",
        },
        eol: {
            type: DataTypes.INTEGER,
            comment: "Unique identifier from the Encyclopedia of Life",
        },
        bold: {
            type: DataTypes.INTEGER,
            comment: "Unique identifier from the Barcode of Life Database",
        },
        status: {
            type: DataTypes.ENUM,
            values: [
                "confirmed",
                "trophic species",
                "morphospecies",
                "nomen dubium",
                "nomen oblitum",
                "nomen nudum",
                "nomen novum",
                "nomen conservandum",
                "species inquirenda"
            ],
            comment: "Status of the taxonomic validation",
            defaultValue: "confirmed",
            allowNull: false
        }
    }, {
        underscored: true,
        freezeTableName: true,
        classMethods: {
            associate: function(models) {
                taxonomy.hasMany(models.node, {
                    foreignKey: 'taxonomy_id'
                }),
                taxonomy.hasMany(models.trait, {
                    onDelete: 'cascade',
                    foreignKey: 'taxonomy_id'
                })
            },
        }
{'fraction_non_alphanumeric': 0.08848167539267016, 'fraction_numerical': 0.0, 'mean_word_length': 1.3327228327228327, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5479650', 'n_tokens_mistral': 994, 'n_tokens_neox': 922, 'n_words': 237}