Below is my schema.yml
CmsFooter:
actAs:
I18n:
fields: [title,description]
Timestampable:
columns:
id:
type: integer(4)
fixed: false
unsigned: false
primary: true
autoincrement: true
is_default:
type: enum(1)
values: [Y, N]
default: N
notnull: true
autoincrement: false
title:
type: string(255)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
description:
type: string()
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
LanguageMaster:
actAs:
Timestampable:
columns:
id:
type: integer(11)
fixed: false
unsigned: false
primary: true
autoincrement: true
name:
type: string(50)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
culture:
type: string(4)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
is_active:
type: enum(1)
fixed: false
unsigned: false
values:
- Y
- N
primary: false
default: N
notnull: true
autoincrement: false
is_default:
type: enum(1)
fixed: false
unsigned: false
values:
- Y
- N
primary: false
default: N
notnull: true
autoincrement: false
file_name:
type: string(50)
fixed: false
unsigned: false
primary: false
notnull: true
autoincrement: false
relations:
CmsFooterTranslation:
local: culture
foreign: lang
type: many
onDelete: CASCADE
onUpdate: CASCADE
I'm generating schema -> DB.
when i'm running this schema it's NOT providing relationship in database table
table name :- cms_footer_translation field :- lang
in relationship i need it should show language_master.culture ondelete cascade & onupdate cascade
any help??
is_default
in your case) simply use:is_default: {type: boolean, notnull: true, default: 0}
. It can save you a lot of work. Detailed explanation here – flu