API > @blocksuite/blocks > DatabaseBlockSchema
Variable: DatabaseBlockSchema ​
const
DatabaseBlockSchema:object
Type declaration ​
model
​
model: {
flavour
:"affine:database"
;props
:PropsGetter
<DatabaseBlockProps
>;role
:"root"
|"hub"
|"content"
;} & {children
:string
[];parent
:string
[];role
:"hub"
;version
:number
;}
model.flavour
​flavour:
"affine:database"
model.props
​props:
PropsGetter
<DatabaseBlockProps
>
model.role
​role:
"root"
|"hub"
|"content"
model.children
​children:
string
[]
model.parent
​parent:
string
[]
model.role
​role:
"hub"
='hub'
model.version
​version:
number
=3
onUpgrade
​
optional
onUpgrade:function
Parameters ​
Parameter | Type |
---|---|
data | DatabaseBlockProps |
previousVersion | number |
latestVersion | number |
Returns ​
void
transformer
​
optional
transformer:function
Returns ​
BaseBlockTransformer
< DatabaseBlockProps
>
version
​
version:
number
Defined In ​
packages/blocks/src/database-block/database-model.ts:296