# Version SVN: $Id: 99_other_schema.yml 1927 2013-08-11 10:08:58Z sven.poeche $
propel:
  menu:
    _attributes:            { phpName: Menu, allowPkInsert: true, isI18N: true, i18nTable: menu_i18n }
    menuid:                 { type: integer, size:  11, required: true, primaryKey: true, autoIncrement: true }
    pid:                    { type: integer, size:  11, required: true, default: 0 }
    menutype:               { type: integer, size:  11, required: true } # 0=root node, 1=predefined page, 2=static page, 3=external page
    status:                 { type: integer, size:  11, required: true, default: 0 } # 0=created, 1=verify, 2=illegal, 3=legal, 4=deleted
    weight:                 { type: integer, size:  11, required: true, default: 0 }
    submenu:                { type: boolean, size:   1, required: true, default: false }
    page:                   { type: integer, size:  11 }
    external_url:           { type: varchar, size: 1024 }
    target:                 { type: integer, size:  11, required: true, default: 0 } # 0=_self, 1=_blank, 2=_parent, 3=_top
    cssid:                  { type: varchar, size:  30 }
    created_at:             { type: timestamp, required: true }
    updated_at:             { type: timestamp, required: true }
    _indexes:
      mnu_i_pid:            [pid]
      mnu_i_type:           [menutype]


  menu_i18n:
    _attributes:            { phpName: MenuI18n, allowPkInsert: true }
    menuid:                 { type: integer, size:  11, required: true, primaryKey: true }
    culture:                { type: varchar, size:   7, required: true, primaryKey: true, isCulture: true }
    name:                   { type: varchar, size: 255, required: true }
    description:            { type: longvarchar }
    _foreignKeys:
      mi_fk_menuid:         { foreignTable: menu, references: [ {local: menuid, foreign: menuid} ] }
    _indexes:
      mi_i_menuid:          [menuid]
      mi_i_culture:         [culture]


  session:
    _attributes:            { phpName: Session, allowPkInsert: true }
    sessid:                 { type: varchar, size: 128, required: true, primaryKey: true }
    uid:                    { type: integer, size:  11, required: true, primaryKey: true }
    hostname:               { type: varchar, size: 244, required: true }
    session:                { type: clob }
    created_at:             { type: timestamp, required: true }
    _foreignKeys:
      sess_fk_uid:          { foreignTable: user, references: [ {local: uid, foreign: uid} ] }
    _indexes:
      sess_i_sessid:        [sessid]
      sess_i_uid:           [uid]


  activity:
    _attributes:            { phpName: Activity, allowPkInsert: true }
    aid:                    { type: integer, size:  11, required: true, primaryKey: true, autoIncrement: true }
    uid:                    { type: integer, size:  11, required: true }
    type:                   { type: varchar, size: 80, required: true } # what kind of activity was raised
    objectid:               { type: integer, size:  11, required: true }
    data:                   { type: clob }
    created_at:             { type: timestamp, required: true }
    _foreignKeys:
      a_fk_uid:             { foreignTable: user, references: [ {local: uid, foreign: uid} ] }
    _indexes:
      a_i_uid:              [uid]
      a_i_type:             [type]

  watchdog:
    _attributes:            { phpName: Watchdog, allowPkInsert: true }
    wid:                    { type: integer, size:  11, required: true, primaryKey: true, autoIncrement: true }
    uid:                    { type: integer, size:  11, required: true }
    type:                   { type: varchar, size:  20, required: true, primaryKey: true } # error, info, status, debug
    severity:               { type: integer, size:   3, required: true, default: 0 }
    message:                { type: clob, required: true }
    hostname:               { type: varchar, size: 244, required: true }
    referer:                { type: varchar, size: 1024 }
    created_at:             { type: timestamp, required: true }
    _foreignKeys:
      w_fk_uid:             { foreignTable: user, references: [ {local: uid, foreign: uid} ] }
    _indexes:
      w_i_wid:              [wid]
      w_i_uid:              [uid]
      w_i_type:             [type]

  stopword:
    _attributes:            { phpName: Stopword, allowPkInsert: true }
    sid:                    { type: integer, size:  11, required: true, primaryKey: true }
    status:                 { type: integer, size:   1, required: true, default: 1 } # 0=disabled, 1=active
    culture:                { type: varchar, size:   7, required: true }
    name:                   { type: varchar, size:  25, required: true }
    _indexes:
      sw_i_name:            [name]
      sw_i_culture:         [culture]
