Skip to content

Instantly share code, notes, and snippets.

@kirkegaard
Created March 24, 2010 10:53
Show Gist options
  • Select an option

  • Save kirkegaard/342173 to your computer and use it in GitHub Desktop.

Select an option

Save kirkegaard/342173 to your computer and use it in GitHub Desktop.
options:
type: INNODB
collate: utf8_general_ci
charset: utf8
User:
columns:
id:
type: integer
primary: true
autoincrement: true
firstname:
type: string(20)
lastname:
type: string(20)
email:
type: string(100)
password:
type: string(64)
actAs:
Sluggable:
unique: true
fields: [firstname, lastname]
canUpdate: true
Timestampable:
created:
name: date_created
updated:
name: date_modified
Person:
columns:
id:
type: integer
primary: true
autoincrement: true
group_id:
type: integer
name:
type: string(50)
address:
type: string(100)
city:
type: string(50)
zipcode:
type: integer
country:
type: integer
phone:
type: integer
birthday:
type: timestamp
gender:
type: boolean
height:
type: integer
shoesize:
type: integer
haircolor:
type: integer
eyecolor:
type: integer
relations:
Pictures:
class: Picture
local: id
foreign: user_id
foreignType: many
type: many
actAs:
Sluggable:
unique: true
fields: [name]
canUpdate: true
Timestampable:
created:
name: date_created
updated:
name: date_modified
PersonGroups:
columns:
id:
type: integer
primary: true
autoincrement: true
name:
type: string(100)
relations:
People:
class: Person
local: id
foreign: group_id
foreignType: many
type: many
Picture:
columns:
id:
type: integer
primary: true
autoincrement: true
user_id:
type: integer
filename:
type: string(200)
Page:
columns:
id:
type: integer
primary: true
autoincrement: true
author_id:
type: integer
isPublished:
type: boolean
default: false
isRoot:
type: boolean
default: false
parent:
type: integer
default: 1
title:
type: string(100)
content:
type: clob
relations:
Author:
class: User
local: author_id
foreign: id
foreignType: one
type: one
actAs:
Sluggable:
unique: true
fields: [title]
canUpdate: true
Timestampable:
created:
name: date_created
updated:
name: date_modified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment