# Version SVN: $Id: 41_playlist_schema.yml 1927 2013-08-11 10:08:58Z sven.poeche $
propel:
  playlist:
    _attributes:            { phpName: Playlist, allowPkInsert: true }
    pid:                    { type: integer, size:  11, required: true, primaryKey: true, autoIncrement: true }
    uid:                    { type: integer, size:  11, required: true }
    title:                  { type: varchar, size: 255, required: true }
    description:            { type: longvarchar }
    created_at:             { type: timestamp, required: true }
    updated_at:             { type: timestamp, required: true }
    _foreignKeys:
      p_fk_uid:             { foreignTable: user, references: [ {local: uid, foreign: uid} ] }

  playlist_media:
    _attributes:            { phpName: PlaylistMedia, allowPkInsert: true }
    pid:                    { type: integer, size:  11, required: true, primaryKey: true }
    mid:                    { type: integer, size:  11, required: true, primaryKey: true }
    weight:                 { type: integer, size:  11, required: true, default: 0 }
    created_at:             { type: timestamp, required: true }
    updated_at:             { type: timestamp, required: true }
    _foreignKeys:
      pm_fk_pid:            { foreignTable: playlist, references: [ {local: pid, foreign: pid} ] }
      pm_fk_mid:            { foreignTable: media, references: [ {local: mid, foreign: mid} ] }
    _indexes:
      pm_i_pid:             [pid]
      pm_i_mid:             [mid]
