# Version SVN: $Id: 00_default_schema.yml 2292 2013-09-19 12:54:22Z sven.poeche $
propel:
  config:
    _attributes:            { phpName: Config, allowPkInsert: true }
    setting:                { type: varchar, size: 255, reguired: true, primaryKey: true }
    value:                  { type: longvarchar, reguired: true }


  statictext:
    _attributes:            { phpName: StaticText, allowPkInsert: true }
    sid:                    { type: integer, size:  11, required: true, primaryKey: true, autoIncrement: true }
    culture:                { type: varchar, size:   7, required: true }
    title:                  { type: varchar, size: 255 } # fulltext index manually !
    content:                { type: longvarchar, required: true } # fulltext index manually !
    created_at:             { type: timestamp, required: true }
    updated_at:             { type: timestamp, required: true }
    _indexes:
      s_i_culture:          [culture]
      s_i_sid_culture:      [sid, culture]


  webcontent:
    _attributes:            { phpName: WebContent, allowPkInsert: true }
    wid:                    { type: integer, size:  11, required: true, primaryKey: true }
    culture:                { type: varchar, size:   7, required: true, primaryKey: true }
    sid:                    { type: integer, size:  11, required: true }
    type:                   { type: integer, size:  11, required: true } # 0=default, ...
    status:                 { type: integer, size:  11, required: true, default: 0 } # 0=created, 1=verify, 2=illegal, 3=legal, 4=deleted
    created_at:             { type: timestamp, required: true }
    updated_at:             { type: timestamp, required: true }
    _foreignKeys:
      wc_fk_sid:            { foreignTable: statictext, references: [ {local: sid, foreign: sid} ] }
    _indexes:
      wc_i_sid:             [sid]


  slide:
    _attributes:            { phpName: Slide, allowPkInsert: true }
    sid:                    { type: integer, size:  11, required: true, primaryKey: true, autoIncrement: true }
    culture:                { type: varchar, size:   7, required: true }
    title:                  { type: varchar, size: 255 } # fulltext index manually !
    text:                   { type: longvarchar, required: true } # fulltext index manually !
    picture_filename:       { type: varchar, size: 255 }
    mid:                    { type: integer, size:  11, required: false }
    weight:                 { type: integer, size:  11, required: true default: 0 }
    status:                 { type: integer, size:  11, required: true, default: 0 } # 0=created, 1=verify, 2=illegal, 3=legal, 4=deleted
    created_at:             { type: timestamp, required: true }
    updated_at:             { type: timestamp, required: true }
    _foreignKeys:
      sl_fk_mid:            { foreignTable: media, references: [ {local: mid, foreign: mid} ] }


