<commit_before>###########################################################
#
# Copyright (c) 2005, Southpaw Technology
#                     All Rights Reserved
#
# PROPRIETARY INFORMATION.  This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permission.
#
#
#

__all__ = ['SthpwUpgrade']


from pyasm.search.upgrade.project import *

class SthpwUpgrade(BaseUpgrade):


    #
    # 4.1.0.b03
    #


    def upgrade_v4_1_0_b03_002(my):
        my.run_sql('''INSERT INTO search_object (code, search_type, namespace, description, "database", table_name, class_name, title, "schema") VALUES ('sthpw/department', 'sthpw/department', 'sthpw', 'Department', 'sthpw', 'department', 'pyasm.search.SObject', 'Department', 'public');
        ''')


    def upgrade_v4_1_0_b03_001(my):
        my.run_sql('''
        CREATE TABLE department (
            id serial PRIMARY KEY,
            code varchar(256),
            name varchar(256),
            "timestamp" timestamp
        );
        ''') 

<commit_msg>BRANCH 4.1:    updated upgrade script to match code with search_type in search_object table<commit_after>###########################################################
#
# Copyright (c) 2005, Southpaw Technology
#                     All Rights Reserved
#
# PROPRIETARY INFORMATION.  This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permission.
#
#
#

__all__ = ['SthpwUpgrade']


from pyasm.search.upgrade.project import *

class SthpwUpgrade(BaseUpgrade):


    def upgrade_v4_1_0_v01_001(my):
        my.run_sql('''UPDATE "search_object" SET code = search_type;''')
    #
    # 4.1.0.b03
    #


    def upgrade_v4_1_0_b03_002(my):
        my.run_sql('''INSERT INTO search_object (code, search_type, namespace, description, "database", table_name, class_name, title, "schema") VALUES ('sthpw/department', 'sthpw/department', 'sthpw', 'Department', 'sthpw', 'department', 'pyasm.search.SObject', 'Department', 'public');
        ''')


    def upgrade_v4_1_0_b03_001(my):
        my.run_sql('''
        CREATE TABLE department (
            id serial PRIMARY KEY,
            code varchar(256),
            name varchar(256),
            "timestamp" timestamp
        );
        ''') 


{'fraction_non_alphanumeric': 0.1608125264494287, 'fraction_numerical': 0.03046974185357596, 'mean_word_length': 3.1914893617021276, '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': '5005667', 'n_tokens_mistral': 802, 'n_tokens_neox': 708, 'n_words': 181}