public $languages; // string(128) not_null
public $agency_id; // int(11) not_null
public $updated_dt; // datetime(19) not_null binary
+ public $deleted_by; // INT
+ public $deleted_dt; // datetime(19) not_null binary
/* the code above is auto generated do not remove the tag below */
function applyFilters($q, $au, $roo)
{
-
+ if (empty($q['_show_deleted']) && empty($q['_is_update_request'])) {
+ $this->whereAdd('core_project.deleted_by = 0');
+ }
+
$tn = $this->tableName();
if (!empty($q['query']['project_search'])) {
$s = $this->escape($q['query']['project_search']);
}
+
+ function beforeUpdate($old, $q, $roo)
+ {
+ if (!empty($q['_flag_deleted'])) {
+ //DB_DataObject::DebugLevel(1);
+ $this->deleted_by = $roo->getAuthUser()->id;
+ $this->deleted_dt = date("Y-m-d H:i:s");
+ }
+ if (!empty($q['_flag_undeleted'])) {
+ $this->deleted_by = 0;
+ $this->deleted_dt = '1000-01-01 00:00:00';
+ }
+ }
+
function onInsert($request,$roo,$event)
{
+++ /dev/null
-
-
--- file is not really used any more..
-
-
--- // core comapy types - use core enums (Company Type)
-DROP TABLE IF EXISTS core_company_type;
-
-
-
--- // old core image type - merged into enum.
-DROP TABLE IF EXISTS core_image_type;
-
-
-
-
-
-
-
--- ----------------------------
-
team_id = core_group:id
open_by = core_person:id
owner_id = core_person:id
-
+deleted_by = core_person:id
[core_group]
leader = core_person:id
ALTER TABLE core_project ADD COLUMN client_id int(11) NOT NULL default '0';
ALTER TABLE core_project ADD COLUMN team_id int(11) NOT NULL default '0';
ALTER TABLE core_project ADD COLUMN file_location varchar(254) NOT NULL default '';
-ALTER TABLE core_project ADD COLUMN open_date date default NULL;
-ALTER TABLE core_project ADD COLUMN open_by int(11) NOT NULL default '0';
-ALTER TABLE core_project ADD COLUMN updated_dt DATETIME NOT NULL;
+ALTER TABLE core_project ADD COLUMN open_date date NOT NULL DEFAULT '1000-01-01';
+ALTER TABLE core_project ADD COLUMN open_by int(11) NOT NULL default 0;
+
+ALTER TABLE core_project ADD COLUMN updated_dt DATETIME NOT NULL DEFAULT '1000-01-01 00:00:00';
+ALTER TABLE core_project ADD COLUMN deleted_by INT NOT NULL DEFAULT 0;
+ALTER TABLE core_project ADD COLUMN deleted_dt DATETIME NOT NULL DEFAULT '1000-01-01 00:00:00';
+
+
-- these should be removed, as they are code specific..
ALTER TABLE core_project ADD COLUMN countries varchar(128) NOT NULL DEFAULT '';