# $Id: sample-override_spops.ini,v 1.5 2003/01/09 03:59:39 lachoy Exp $

# Sample SPOPS override rules. If you decide to use override rules,
# save them to '$WEBSITE_DIR/conf/override_spops.ini'.

########################################
# REPLACE SPOPS DRIVER
# Widely requested feature: replace the SPOPS driver to use your
# database. Just replace 'SPOPS::DBI::Pg' with your favorite driver.

[error_object.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg

[group.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg

[error_object.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg

[content_type.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg

[security.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg

[sitetemplate.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg

[theme.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg

[themeprop.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg

[user.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg

[object_action.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg

# These objects are not installed automatically, so you might not want
# to copy/paste them

[classified.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg

[news.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg

[news_section.isa]
action  = replace
replace = SPOPS::DBI::MySQL
value   = SPOPS::DBI::Pg


########################################
# FULL-TEXT INDEX

[news.isa]
action  = add
value   = OpenInteract::FullText
type    = list
queue   = front

[news.fulltext_field]
action  = add
value   = title
value   = news_item


########################################
# POSTGRESQL SERIAL USAGE
# If you're upgrading to a 1.40+ version and don't want to change your
# schema, you'll need to override the sequence names to match what
# PostgreSQL automatically generates with the SERIAL datatype:

[group.sequence_name]
action  = replace
value   = sys_group_group_id_seq

[security.sequence_name]
action  = replace
value   = sys_security_sid_seq

[sitetemplate.sequence_name]
action  = replace
value   = template_template_id_seq

[theme.sequence_name]
action  = replace
value   = theme_theme_id_seq

[themeprop.sequence_name]
action  = replace
value   = theme_prop_themeprop_id_seq

[user.sequence_name]
action  = replace
value   = sys_user_user_id_seq

[classified.sequence_name]
action  = replace
value   = classified_classified_id_seq

[news.sequence_name]
action  = replace
value   = news_news_id_seq

[content_type.sequence_name]
action  = replace
value   = content_type_content_type_i_seq

[object_action.sequence_name]
action  = replace
value   = object_track_objtrack_id_seq


########################################
# INSERT TRANSFORMATION
#  Example: modify all date fields for Oracle

[user.insert_alter.last_login]
action  = add
value   = to_date('%s','YYYY-MM-DD HH24:MI:SS')

[user.insert_alter.removal_date]
action  = add
value   = to_date('%s','YYYY-MM-DD HH24:MI:SS')

[error_object.insert_alter.error_time]
action  = add
value   = to_date('%s','YYYY-MM-DD HH24:MI:SS')

[page.insert_alter.active_on]
action  = add
value   = to_date('%s','YYYY-MM-DD HH24:MI:SS')

[page.insert_alter.expires_on]
action  = add
value   = to_date('%s','YYYY-MM-DD HH24:MI:SS')

[object_action.insert_alter.action_on]
action  = add
value   = to_date('%s','YYYY-MM-DD HH24:MI:SS')


########################################
# SELECT TRANSFORMATIONS

#  Example: modify a date field for MySQL

[news.field_alter.posted_on]
action  = add
value   = DATE_FORMAT( posted_on, '%a %b %d %h:%i %p' )

#  Example: modify a MySQL News title to be: "[Section] Title"

[news.field_alter.title]
action  = add
value   = CONCAT( "[", section, "] ", title )