Ticket #1701: schema.yml

File schema.yml, 1.8 KB (added by dao, 16 months ago)

schema.yml with Section acting as NestedSet?

Line 
1Member:
2  tableName: member
3  columns:
4    sf_guard_user_id: integer(4)
5    first_name:     string(255)
6    last_name:      string(255)
7    email_address:  string(255)
8    bio:            string
9    inspiration:    string
10    list_position:  integer(3)
11    featured:       { type: boolean, default: false }
12    image_on_id:    integer(4)
13    image_off_id:   integer(4)
14  relations:
15    User:
16      class: sfGuardUser
17      foreignType: one
18      local: sf_guard_user_id
19    ImageOn:
20      class: ImageAsset
21      type: one
22      local: image_on_id
23    ImageOff:
24      class: ImageAsset
25      type: one
26      local: image_off_id
27 
28CaseStudy:
29  tableName: case_study
30  columns:
31    client_id:  { type: integer(4), notnull: true }
32    objective:  { type: string(255) }
33    strategy:   { type: string }
34  relations:
35    Images:
36      class:  ImageAsset
37      type:   many
38      foreignType: one
39    Client:
40      class:  Client
41      type:   one
42      foreignType: many
43 
44Client:
45  tableName: client
46  columns:
47    id:   { type: integer(4), autoincrement: true, notnull: true, primary: true }
48    image_asset_id:   integer(4)
49    name: { type: string(255) }
50  relations:
51    Logo:
52      class:  ImageAsset
53      type:   one
54      foreignType: one
55
56Section:
57  actAs:
58    Sluggable:
59      unique: true
60      fields: [name]
61      canUpdate: true
62    NestedSet:
63  columns:
64    name: { type: string(20) }
65    content: { type: string }
66    image_asset_id: integer(4)
67  relations:
68    Image:
69      class:  ImageAsset
70      foreignType: one
71   
72ImageAsset:
73  tableName: asset_image
74  columns:
75    id:   { type: integer(4), autoincrement: true, notnull: true, primary: true }
76    filename: { type: string(255) }
77    path: { type: string(255) }
78    mime_type: { type: string(100) }
79    extension: { type: string(3) }
80    width: { type: integer(5) }
81    height: { type: integer(5) }
82