Kbi
Kbi

Reputation: 384

yml scheme unique constraints

I want to add a candidate key to my yml scheme. Is it possible with yml? How do I do it? I can't find anything with Google.

EDIT: is this also possible with unique constraints? If so I tried it with

uniqueConstraints:
  name_presId:
    columns:  name, presentationId

Given is the following structure:

---
EFImage:
tableName: ef_images
columns:
presentation_id as presentationId: integer
data: blob
name: string(255)
is_sendable as isSendable:
  type: integer(4)
  default: 0
use_for as useFor: 
  type: integer(4)
  default: 0
  relations:
ButtonBackgrounds:
  class: EFButton
  foreign: backgroundImageId
  local: id
  type: many
ImageViews:
  class: EFImageView
  foreign: imageId
  local: id
  type: many
Videos:
  class: EFVideo
  foreign: previewImageId
  local: id
  type: many
Presentation:
  class: EFPresentation
  local: presentationId
  foreign: id
  type: one
options:
type: InnoDB

Upvotes: 1

Views: 96

Answers (0)

Related Questions