adding APP_FILES table to store templates and public files from Files Manager option
This commit is contained in:
19
workflow/engine/classes/model/AppFiles.php
Normal file
19
workflow/engine/classes/model/AppFiles.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
require_once 'classes/model/om/BaseAppFiles.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'APP_FILES' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package classes.model
|
||||
*/
|
||||
class AppFiles extends BaseAppFiles {
|
||||
|
||||
} // AppFiles
|
||||
23
workflow/engine/classes/model/AppFilesPeer.php
Normal file
23
workflow/engine/classes/model/AppFilesPeer.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
// include base peer class
|
||||
require_once 'classes/model/om/BaseAppFilesPeer.php';
|
||||
|
||||
// include object class
|
||||
include_once 'classes/model/AppFiles.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'APP_FILES' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package classes.model
|
||||
*/
|
||||
class AppFilesPeer extends BaseAppFilesPeer {
|
||||
|
||||
} // AppFilesPeer
|
||||
88
workflow/engine/classes/model/map/AppFilesMapBuilder.php
Normal file
88
workflow/engine/classes/model/map/AppFilesMapBuilder.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
require_once 'propel/map/MapBuilder.php';
|
||||
include_once 'creole/CreoleTypes.php';
|
||||
|
||||
|
||||
/**
|
||||
* This class adds structure of 'APP_FILES' table to 'workflow' DatabaseMap object.
|
||||
*
|
||||
*
|
||||
*
|
||||
* These statically-built map classes are used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package workflow.classes.model.map
|
||||
*/
|
||||
class AppFilesMapBuilder
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'classes.model.map.AppFilesMapBuilder';
|
||||
|
||||
/**
|
||||
* The database map.
|
||||
*/
|
||||
private $dbMap;
|
||||
|
||||
/**
|
||||
* Tells us if this DatabaseMapBuilder is built so that we
|
||||
* don't have to re-build it every time.
|
||||
*
|
||||
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
|
||||
*/
|
||||
public function isBuilt()
|
||||
{
|
||||
return ($this->dbMap !== null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the databasemap this map builder built.
|
||||
*
|
||||
* @return the databasemap
|
||||
*/
|
||||
public function getDatabaseMap()
|
||||
{
|
||||
return $this->dbMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* The doBuild() method builds the DatabaseMap
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function doBuild()
|
||||
{
|
||||
$this->dbMap = Propel::getDatabaseMap('workflow');
|
||||
|
||||
$tMap = $this->dbMap->addTable('APP_FILES');
|
||||
$tMap->setPhpName('AppFiles');
|
||||
|
||||
$tMap->setUseIdGenerator(false);
|
||||
|
||||
$tMap->addPrimaryKey('APF_UID', 'ApfUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('CREATE_USR_UID', 'CreateUsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('LAST_UPDATE_USR_UID', 'LastUpdateUsrUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||
|
||||
$tMap->addColumn('APF_PATH', 'ApfPath', 'string', CreoleTypes::VARCHAR, true, 256);
|
||||
|
||||
$tMap->addColumn('APF_TYPE', 'ApfType', 'string', CreoleTypes::VARCHAR, false, 32);
|
||||
|
||||
$tMap->addColumn('APF_EDITABLE', 'ApfEditable', 'int', CreoleTypes::TINYINT, false, null);
|
||||
|
||||
$tMap->addColumn('APF_CREATE_DATE', 'ApfCreateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
|
||||
|
||||
$tMap->addColumn('APF_UPDATE_DATE', 'ApfUpdateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
|
||||
|
||||
} // doBuild()
|
||||
|
||||
} // AppFilesMapBuilder
|
||||
@@ -67,6 +67,8 @@ class LanguageMapBuilder
|
||||
|
||||
$tMap->addPrimaryKey('LAN_ID', 'LanId', 'string', CreoleTypes::VARCHAR, true, 4);
|
||||
|
||||
$tMap->addColumn('LAN_LOCATION', 'LanLocation', 'string', CreoleTypes::VARCHAR, true, 4);
|
||||
|
||||
$tMap->addColumn('LAN_NAME', 'LanName', 'string', CreoleTypes::VARCHAR, true, 30);
|
||||
|
||||
$tMap->addColumn('LAN_NATIVE_NAME', 'LanNativeName', 'string', CreoleTypes::VARCHAR, true, 30);
|
||||
|
||||
1022
workflow/engine/classes/model/om/BaseAppFiles.php
Normal file
1022
workflow/engine/classes/model/om/BaseAppFiles.php
Normal file
File diff suppressed because it is too large
Load Diff
607
workflow/engine/classes/model/om/BaseAppFilesPeer.php
Normal file
607
workflow/engine/classes/model/om/BaseAppFilesPeer.php
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,19 @@
|
||||
<?php
|
||||
|
||||
require_once 'propel/om/BaseObject.php';
|
||||
|
||||
require_once 'propel/om/Persistent.php';
|
||||
|
||||
|
||||
include_once 'propel/util/Criteria.php';
|
||||
|
||||
include_once 'classes/model/LanguagePeer.php';
|
||||
|
||||
/**
|
||||
* Base class that represents a row from the 'LANGUAGE' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @package workflow.classes.model.om
|
||||
*/
|
||||
abstract class BaseLanguage extends BaseObject implements Persistent
|
||||
@@ -385,7 +391,7 @@ abstract class BaseLanguage extends BaseObject implements Persistent
|
||||
$this->setNew(false);
|
||||
|
||||
// FIXME - using NUM_COLUMNS may be clearer.
|
||||
return $startcol + 7; // 7 = LanguagePeer::NUM_COLUMNS - LanguagePeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 8; // 8 = LanguagePeer::NUM_COLUMNS - LanguagePeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating Language object", $e);
|
||||
@@ -750,6 +756,7 @@ abstract class BaseLanguage extends BaseObject implements Persistent
|
||||
if (array_key_exists($keys[7], $arr)) {
|
||||
$this->setLanCalendar($arr[$keys[7]]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -766,7 +773,7 @@ abstract class BaseLanguage extends BaseObject implements Persistent
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(LanguagePeer::LAN_LOCATION)) {
|
||||
$criteria->add(LanguagePeer::LAN_ID, $this->lan_location);
|
||||
$criteria->add(LanguagePeer::LAN_LOCATION, $this->lan_location);
|
||||
}
|
||||
|
||||
if ($this->isColumnModified(LanguagePeer::LAN_NAME)) {
|
||||
@@ -896,7 +903,6 @@ abstract class BaseLanguage extends BaseObject implements Persistent
|
||||
* same instance for all member of this class. The method could therefore
|
||||
* be static, but this would prevent one from overriding the behavior.
|
||||
*
|
||||
*
|
||||
* @return LanguagePeer
|
||||
*/
|
||||
public function getPeer()
|
||||
|
||||
@@ -25,7 +25,7 @@ abstract class BaseLanguagePeer
|
||||
const CLASS_DEFAULT = 'classes.model.Language';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 7;
|
||||
const NUM_COLUMNS = 8;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
@@ -69,7 +69,7 @@ abstract class BaseLanguagePeer
|
||||
BasePeer::TYPE_PHPNAME => array ('LanId', 'LanLocation', 'LanName', 'LanNativeName', 'LanDirection', 'LanWeight', 'LanEnabled', 'LanCalendar', ),
|
||||
BasePeer::TYPE_COLNAME => array (LanguagePeer::LAN_ID, LanguagePeer::LAN_LOCATION, LanguagePeer::LAN_NAME, LanguagePeer::LAN_NATIVE_NAME, LanguagePeer::LAN_DIRECTION, LanguagePeer::LAN_WEIGHT, LanguagePeer::LAN_ENABLED, LanguagePeer::LAN_CALENDAR, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('LAN_ID', 'LAN_LOCATION', 'LAN_NAME', 'LAN_NATIVE_NAME', 'LAN_DIRECTION', 'LAN_WEIGHT', 'LAN_ENABLED', 'LAN_CALENDAR', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7,)
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -82,7 +82,7 @@ abstract class BaseLanguagePeer
|
||||
BasePeer::TYPE_PHPNAME => array ('LanId' => 0, 'LanLocation' => 1, 'LanName' => 2, 'LanNativeName' => 3, 'LanDirection' => 4, 'LanWeight' => 5, 'LanEnabled' => 6, 'LanCalendar' => 7, ),
|
||||
BasePeer::TYPE_COLNAME => array (LanguagePeer::LAN_ID => 0, LanguagePeer::LAN_LOCATION => 1, LanguagePeer::LAN_NAME => 2, LanguagePeer::LAN_NATIVE_NAME => 3, LanguagePeer::LAN_DIRECTION => 4, LanguagePeer::LAN_WEIGHT => 5, LanguagePeer::LAN_ENABLED => 6, LanguagePeer::LAN_CALENDAR => 7, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('LAN_ID' => 0, 'LAN_LOCATION' => 1, 'LAN_NAME' => 2, 'LAN_NATIVE_NAME' => 3, 'LAN_DIRECTION' => 4, 'LAN_WEIGHT' => 5, 'LAN_ENABLED' => 6, 'LAN_CALENDAR' => 7, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7,)
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -3014,6 +3014,38 @@
|
||||
</index>
|
||||
</table>
|
||||
|
||||
<table name="APP_FILES">
|
||||
<vendor type="mysql">
|
||||
<parameter name="Name" value="APP_FILES"/>
|
||||
<parameter name="Engine" value="InnoDB"/>
|
||||
<parameter name="Version" value="10"/>
|
||||
<parameter name="Row_format" value="Dynamic"/>
|
||||
<parameter name="Rows" value="129"/>
|
||||
<parameter name="Avg_row_length" value="115"/>
|
||||
<parameter name="Data_length" value="14860"/>
|
||||
<parameter name="Max_data_length" value="281474976710655"/>
|
||||
<parameter name="Index_length" value="5120"/>
|
||||
<parameter name="Data_free" value="0"/>
|
||||
<parameter name="Auto_increment" value=""/>
|
||||
<parameter name="Create_time" value="2011-10-28 09:55:00"/>
|
||||
<parameter name="Update_time" value="2011-10-28 09:55:00"/>
|
||||
<parameter name="Check_time" value=""/>
|
||||
<parameter name="Collation" value="utf8_general_ci"/>
|
||||
<parameter name="Checksum" value=""/>
|
||||
<parameter name="Create_options" value=""/>
|
||||
<parameter name="Comment" value="Application files metadata"/>
|
||||
</vendor>
|
||||
<column name="APF_UID" type="VARCHAR" size="32" required="true" primaryKey="true" />
|
||||
<column name="PRO_UID" type="VARCHAR" size="32" required="true" />
|
||||
<column name="CREATE_USR_UID" type="VARCHAR" size="32" required="true" />
|
||||
<column name="LAST_UPDATE_USR_UID" type="VARCHAR" size="32" required="true" />
|
||||
<column name="APF_PATH" type="VARCHAR" size="256" required="true" default="" />
|
||||
<column name="APF_TYPE" type="VARCHAR" size="32" required="false" default="" />
|
||||
<column name="APF_EDITABLE" type="TINYINT" required="false" default="1" />
|
||||
<column name="APF_CREATE_DATE" type="TIMESTAMP" required="true" />
|
||||
<column name="APF_UPDATE_DATE" type="TIMESTAMP" required="false" />
|
||||
</table>
|
||||
|
||||
<!--
|
||||
OAUTH TABLES DEFINITION
|
||||
-->
|
||||
|
||||
@@ -321,8 +321,8 @@ DROP TABLE IF EXISTS `LANGUAGE`;
|
||||
CREATE TABLE `LANGUAGE`
|
||||
(
|
||||
`LAN_ID` VARCHAR(4) default '' NOT NULL,
|
||||
`LAN_NAME` VARCHAR(30) default '' NOT NULL,
|
||||
`LAN_LOCATION` VARCHAR(4) default '' NOT NULL,
|
||||
`LAN_NAME` VARCHAR(30) default '' NOT NULL,
|
||||
`LAN_NATIVE_NAME` VARCHAR(30) default '' NOT NULL,
|
||||
`LAN_DIRECTION` CHAR(1) default 'L' NOT NULL,
|
||||
`LAN_WEIGHT` INTEGER default 0 NOT NULL,
|
||||
@@ -1475,6 +1475,26 @@ CREATE TABLE `SESSION_STORAGE`
|
||||
KEY `indexSessionStorage`(`ID`)
|
||||
)ENGINE=InnoDB ;
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- APP_FILES
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `APP_FILES`;
|
||||
|
||||
|
||||
CREATE TABLE `APP_FILES`
|
||||
(
|
||||
`APF_UID` VARCHAR(32) NOT NULL,
|
||||
`PRO_UID` VARCHAR(32) NOT NULL,
|
||||
`CREATE_USR_UID` VARCHAR(32) NOT NULL,
|
||||
`LAST_UPDATE_USR_UID` VARCHAR(32) NOT NULL,
|
||||
`APF_PATH` VARCHAR(256) default '' NOT NULL,
|
||||
`APF_TYPE` VARCHAR(32) default '',
|
||||
`APF_EDITABLE` TINYINT default 1,
|
||||
`APF_CREATE_DATE` DATETIME NOT NULL,
|
||||
`APF_UPDATE_DATE` DATETIME,
|
||||
PRIMARY KEY (`APF_UID`)
|
||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Application files metadata';
|
||||
#-----------------------------------------------------------------------------
|
||||
#-- OAUTH_ACCESS_TOKENS
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user