These extensions are not considered secure nor stable right now, so don't
use them for a while.
{
return array(
'fields' => array(
{
return array(
'fields' => array(
- 'id' => array('type' => 'int', 'not null' => true, 'description' => 'Unique ID for Photo'),
+ 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique ID for Photo'),
'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'Notice ID for the related notice'),
'album_id' => array('type' => 'int', 'not null' => true, 'description' => 'The parent album ID'),
'uri' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'unique address for this photo'),
'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'Notice ID for the related notice'),
'album_id' => array('type' => 'int', 'not null' => true, 'description' => 'The parent album ID'),
'uri' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'unique address for this photo'),
),
'primary key' => array('id'),
'unique keys' => array(
),
'primary key' => array('id'),
'unique keys' => array(
- 'gnusocialphoto_uri' => array('uri'),
+ 'gnusocialphoto_id_key' => array('notice_id'),
+ 'gnusocialphoto_uri_key' => array('uri'),
),
'foreign keys' => array(
'gnusocialphoto_notice_id_fkey' => array('notice', array('notice_id' => 'id')),
),
'foreign keys' => array(
'gnusocialphoto_notice_id_fkey' => array('notice', array('notice_id' => 'id')),
{
return array(
'fields' => array(
{
return array(
'fields' => array(
- 'album_id' => array('type' => 'int', 'not null' => true, 'description' => 'Unique identifier for the album'),
+ 'album_id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique identifier for the album'),
'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'Profile ID for the owner of the album'),
'album_name' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'Title for this album'),
'album_description' => array('type' => 'text', 'not null' => true, 'description' => 'A description for this album'),
'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'Profile ID for the owner of the album'),
'album_name' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'Title for this album'),
'album_description' => array('type' => 'text', 'not null' => true, 'description' => 'A description for this album'),
class GNUsocialProfileExtensionField extends Managed_DataObject
{
class GNUsocialProfileExtensionField extends Managed_DataObject
{
- public $__table = 'GNUsocialProfileExtensionField';
+ public $__table = 'gnusocialprofileextensionfield';
public $id; // int(11)
public $systemname; // varchar(64)
public $title; // varchar(255)
public $id; // int(11)
public $systemname; // varchar(64)
public $title; // varchar(255)
{
return array(
'fields' => array(
{
return array(
'fields' => array(
- 'id' => array('type' => 'int', 'not null' => true, 'description' => 'Unique ID for extension field'),
+ 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique ID for extension field'),
'systemname' => array('type' => 'varchar', 'not null' => true, 'length' => 64, 'description' => 'field systemname'),
'title' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'field title'),
'description' => array('type' => 'text', 'not null' => true, 'description' => 'field description'),
'systemname' => array('type' => 'varchar', 'not null' => true, 'length' => 64, 'description' => 'field systemname'),
'title' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'field title'),
'description' => array('type' => 'text', 'not null' => true, 'description' => 'field description'),
- function keyTypes()
- {
- return array('id' => 'K');
- }
-
- function sequenceKey()
- {
- return array(false, false, false);
- }
-
static function newField($title, $description=null, $type='str', $systemname=null)
{
$field = new GNUsocialProfileExtensionField();
static function newField($title, $description=null, $type='str', $systemname=null)
{
$field = new GNUsocialProfileExtensionField();
class GNUsocialProfileExtensionResponse extends Managed_DataObject
{
class GNUsocialProfileExtensionResponse extends Managed_DataObject
{
- public $__table = 'GNUsocialProfileExtensionResponse';
+ public $__table = 'gnusocialprofileextensionresponse';
public $id; // int(11)
public $extension_id; // int(11)
public $profile_id; // int(11)
public $id; // int(11)
public $extension_id; // int(11)
public $profile_id; // int(11)
{
return array(
'fields' => array(
{
return array(
'fields' => array(
- 'id' => array('type' => 'int', 'not null' => true, 'description' => 'Unique ID for extension response'),
+ 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique ID for extension response'),
'extension_id' => array('type' => 'int', 'not null' => true, 'description' => 'The extension field ID'),
'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'Profile id that made the response'),
'value' => array('type' => 'text', 'not null' => true, 'description' => 'response entry'),
'extension_id' => array('type' => 'int', 'not null' => true, 'description' => 'The extension field ID'),
'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'Profile id that made the response'),
'value' => array('type' => 'text', 'not null' => true, 'description' => 'response entry'),
'primary key' => array('id'),
'foreign keys' => array(
'gnusocialprofileextensionresponse_profile_id_fkey' => array('profile', array('profile_id' => 'id')),
'primary key' => array('id'),
'foreign keys' => array(
'gnusocialprofileextensionresponse_profile_id_fkey' => array('profile', array('profile_id' => 'id')),
- 'gnusocialprofileextensionresponse_extension_id_fkey' => array('GNUsocialProfileExtensionField', array('extension_id' => 'id')),
+ 'gnusocialprofileextensionresponse_extension_id_fkey' => array('gnusocialprofileextensionfield', array('extension_id' => 'id')),
),
'indexes' => array(
'gnusocialprofileextensionresponse_extension_id_idx' => array('extension_id'),
),
'indexes' => array(
'gnusocialprofileextensionresponse_extension_id_idx' => array('extension_id'),
static function findResponsesByProfile($id)
{
static function findResponsesByProfile($id)
{
- $extf = 'GNUsocialProfileExtensionField';
- $extr = 'GNUsocialProfileExtensionResponse';
+ $extf = 'gnusocialprofileextensionfield';
+ $extr = 'gnusocialprofileextensionresponse';
$sql = "SELECT $extr.*, $extf.title, $extf.description, $extf.type, $extf.systemname FROM $extr JOIN $extf ON $extr.extension_id=$extf.id WHERE $extr.profile_id = $id";
$response = new GNUsocialProfileExtensionResponse();
$response->query($sql);
$sql = "SELECT $extr.*, $extf.title, $extf.description, $extf.type, $extf.systemname FROM $extr JOIN $extf ON $extr.extension_id=$extf.id WHERE $extr.profile_id = $id";
$response = new GNUsocialProfileExtensionResponse();
$response->query($sql);