1
0
mirror of synced 2025-02-20 14:13:15 +03:00

Initial entry of sandbox schema and data fixtures.

This commit is contained in:
Jonathan.Wage 2007-10-18 04:04:28 +00:00
parent 90fd42291e
commit c7b5185be2
36 changed files with 650 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
Adult:
Adult_1:
name: Parent 1
Contact: Contact_1

View File

@ -0,0 +1,8 @@
---
Car:
Car_1:
name: Chevorlet Trailblazer
Car_2:
name: Chevorlet Blazer
Car_3:
name: Buick

View File

@ -0,0 +1,5 @@
---
Child:
Child_1:
name: Child 1
Adult: Adult_1

View File

@ -0,0 +1,8 @@
---
Contact:
Contact_1:
name: Jonathan H. Wage
Contact_3:
name: Daniel Adams
Contact_4:
name: Robert Adams

View File

@ -0,0 +1,8 @@
---
Contact:
Contact_1:
name: jonathan h. wage
User:
User_1:
username: jonwage
Contact: Contact_1

View File

@ -0,0 +1,11 @@
---
Dog:
Dog_1:
name: Sam
User: User_1
Dog_2:
name: Dixie
User: User_2
Dog_3:
name: Chief
User: User_3

View File

@ -0,0 +1,20 @@
---
SelfReference:
SelfReference_1:
User1: User_1
User2: User_2
name: Self Reference 1
SelfReference1: SelfReference_2
SelfReference2: SelfReference_3
SelfReference_2:
User1: User_2
User2: User_1
name: Self Reference 2
SelfReference1: SelfReference_1
SelfReference2: SelfReference_1
SelfReference_3:
User1: User_2
User2: User_1
name: Self Reference 3
SelfReference1: SelfReference_3
SelfReference2: SelfReference_3

View File

@ -0,0 +1,14 @@
---
User:
User_1:
username: jwage
hair_color: light brown
Contact: Contact_1
User_2:
username: dadams
hair_color: dark brown
Contact: Contact_3
User_3:
username: radams
hair_color: light brown
Contact: Contact_4

View File

@ -0,0 +1,11 @@
---
UserCar:
UserCar_1:
User: User_1
Car: Car_1
UserCar_2:
User: User_2
Car: Car_2
UserCar_3:
User: User_3
Car: Car_3

View File

@ -0,0 +1,12 @@
<?php
require_once('generated/BaseAdult.class.php');
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class Adult extends BaseAdult
{
}

View File

@ -0,0 +1,12 @@
<?php
require_once('generated/BaseCar.class.php');
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class Car extends BaseCar
{
}

View File

@ -0,0 +1,12 @@
<?php
require_once('generated/BaseChild.class.php');
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class Child extends BaseChild
{
}

View File

@ -0,0 +1,12 @@
<?php
require_once('generated/BaseDog.class.php');
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class Dog extends BaseDog
{
}

View File

@ -0,0 +1,12 @@
<?php
require_once('generated/BaseEntity.class.php');
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class Entity extends BaseEntity
{
}

View File

@ -0,0 +1,12 @@
<?php
require_once('generated/BaseGroup.class.php');
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class Group extends BaseGroup
{
}

View File

@ -0,0 +1,12 @@
<?php
require_once('generated/BaseSelfReference.class.php');
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class SelfReference extends BaseSelfReference
{
}

View File

@ -0,0 +1,12 @@
<?php
require_once('generated/BaseUserCar.class.php');
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class UserCar extends BaseUserCar
{
}

View File

@ -0,0 +1,12 @@
<?php
require_once('generated/BaseUserGroup.class.php');
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class UserGroup extends BaseUserGroup
{
}

View File

@ -0,0 +1,34 @@
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
abstract class BaseAdult extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('adult');
$this->hasColumn('id', 'integer', 11, array('primary' => true,
'autoincrement' => true));
$this->hasColumn('name', 'string', 255);
$this->hasColumn('contact_id', 'integer', 11);
}
public function setUp()
{
$this->hasOne('Contact', array('local' => 'contact_id',
'foreign' => 'id'));
$this->hasMany('Child as Children', array('local' => 'id',
'foreign' => 'adult_id'));
}
}

View File

@ -0,0 +1,30 @@
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
abstract class BaseCar extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('car');
$this->hasColumn('id', 'integer', 11, array('primary' => true,
'autoincrement' => true));
$this->hasColumn('name', 'string', 255);
}
public function setUp()
{
$this->hasMany('User as Users', array('refClass' => 'UserCar',
'local' => 'car_id',
'foreign' => 'user_id'));
}
}

View File

@ -0,0 +1,31 @@
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
abstract class BaseChild extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('child');
$this->hasColumn('id', 'integer', 11, array('primary' => true,
'autoincrement' => true));
$this->hasColumn('name', 'string', 255);
$this->hasColumn('adult_id', 'integer', 11);
}
public function setUp()
{
$this->hasOne('Adult', array('local' => 'adult_id',
'foreign' => 'id'));
}
}

View File

@ -0,0 +1,31 @@
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
abstract class BaseDog extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('dog');
$this->hasColumn('id', 'integer', 11, array('primary' => true,
'autoincrement' => true));
$this->hasColumn('name', 'string', 255);
$this->hasColumn('user_id', 'integer', 11);
}
public function setUp()
{
$this->hasOne('User', array('local' => 'user_id',
'foreign' => 'id'));
}
}

View File

@ -0,0 +1,22 @@
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
abstract class BaseEntity extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('entity');
$this->hasColumn('id', 'integer', 11, array('primary' => true,
'autoincrement' => true));
}
}

View File

@ -0,0 +1,31 @@
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
abstract class BaseGroup extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('group');
$this->hasColumn('id', 'integer', 4, array('notnull' => true,
'primary' => true,
'autoincrement' => true));
$this->hasColumn('name', 'string', 255);
}
public function setUp()
{
$this->hasMany('User as Users', array('refClass' => 'UserGroup',
'local' => 'group_id',
'foreign' => 'user_id'));
}
}

View File

@ -0,0 +1,52 @@
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
abstract class BaseSelfReference extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('self_reference');
$this->hasColumn('id', 'integer', 11, array('primary' => true,
'autoincrement' => true));
$this->hasColumn('name', 'string', 255);
$this->hasColumn('user_id1', 'integer', 11);
$this->hasColumn('user_id2', 'integer', 11);
$this->hasColumn('parent_self_reference_id', 'integer', 11);
$this->hasColumn('parent_self_reference_id2', 'integer', 11);
}
public function setUp()
{
$this->hasOne('User as User1', array('local' => 'user_id1',
'foreign' => 'id'));
$this->hasOne('User as User2', array('local' => 'user_id2',
'foreign' => 'id'));
$this->hasOne('SelfReference as SelfReference1', array('local' => 'parent_self_reference_id',
'foreign' => 'id'));
$this->hasOne('SelfReference as SelfReference2', array('local' => 'parent_self_reference_id2',
'foreign' => 'id'));
$this->hasMany('SelfReference as SelfReferences1', array('local' => 'id',
'foreign' => 'parent_self_reference_id'));
$this->hasMany('SelfReference as SelfReferences2', array('local' => 'id',
'foreign' => 'parent_self_reference_id2'));
}
}

View File

@ -0,0 +1,31 @@
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
abstract class BaseUserCar extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('user_car');
$this->hasColumn('user_id', 'integer', 11, array('primary' => true));
$this->hasColumn('car_id', 'integer', 11, array('primary' => true));
}
public function setUp()
{
$this->hasOne('User', array('local' => 'user_id',
'foreign' => 'id'));
$this->hasOne('Car', array('local' => 'car_id',
'foreign' => 'id'));
}
}

View File

@ -0,0 +1,31 @@
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
abstract class BaseUserGroup extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('user_group');
$this->hasColumn('user_id', 'integer', 4, array('primary' => true));
$this->hasColumn('group_id', 'integer', 4, array('primary' => true));
}
public function setUp()
{
$this->hasOne('User', array('local' => 'user_id',
'foreign' => 'id'));
$this->hasOne('Group', array('local' => 'group_id',
'foreign' => 'id'));
}
}

17
sandbox/schema/adult.yml Normal file
View File

@ -0,0 +1,17 @@
---
Adult:
fields:
id:
type: integer
size: 11
primary: true
autoincrement: true
name:
type: string
size: 255
contact_id:
type: integer
size: 11
relations:
Contact:
foreignType: one

15
sandbox/schema/car.yml Normal file
View File

@ -0,0 +1,15 @@
---
Car:
columns:
id:
type: integer
length: 11
primary: true
autoincrement: true
name:
type: string
length: 255
relations:
Users:
class: User
refClass: UserCar

17
sandbox/schema/child.yml Normal file
View File

@ -0,0 +1,17 @@
---
Child:
fields:
id:
type: integer
size: 11
primary: true
autoincrement: true
name:
type: string
size: 255
adult_id:
type: integer
size: 11
relations:
Adult:
foreignAlias: Children

17
sandbox/schema/dog.yml Normal file
View File

@ -0,0 +1,17 @@
---
Dog:
columns:
id:
type: integer
length: 11
primary: true
autoincrement: true
name:
type: string
length: 255
user_id:
type: integer
length: 11
relations:
User:
foreignType: one

View File

@ -0,0 +1,8 @@
---
Entity:
columns:
id:
type: integer
size: 11
primary: true
autoincrement: true

17
sandbox/schema/group.yml Normal file
View File

@ -0,0 +1,17 @@
---
Group:
columns:
id:
notnull: true
primary: true
autoincrement: true
type: integer
length: 4
name: id
name:
type: string
length: 255
relations:
Users:
class: User
refClass: UserGroup

View File

@ -0,0 +1,40 @@
---
SelfReference:
fields:
id:
type: integer
size: 11
primary: true
autoincrement: true
name:
type: string
size: 255
user_id1:
type: integer
size: 11
user_id2:
type: integer
size: 11
parent_self_reference_id:
type: integer
size: 11
parent_self_reference_id2:
type: integer
size: 11
relations:
User1:
class: User
local: user_id1
foreignAlias: SelfReference1
User2:
class: User
local: user_id2
foreignAlias: SelfReference2
SelfReference1:
class: SelfReference
local: parent_self_reference_id
foreignAlias: SelfReferences1
SelfReference2:
class: SelfReference
local: parent_self_reference_id2
foreignAlias: SelfReferences2

View File

@ -0,0 +1,14 @@
---
UserCar:
columns:
user_id:
type: integer
length: 11
primary: true
car_id:
type: integer
length: 11
primary: true
relations:
User: -
Car: -

View File

@ -0,0 +1,14 @@
---
UserGroup:
columns:
user_id:
type: integer
length: 4
primary: true
group_id:
type: integer
length: 4
primary: true
relations:
User: -
Group: -