@dxos/client
Preparing search index...
echo
defineObjectMigration
Variable defineObjectMigration
Const
defineObjectMigration
:
<
From
extends
Schema.AnyNoContext
,
To
extends
Schema.AnyNoContext
,
>
(
options
:
{
from
:
From
;
onMigration
:
(
params
:
{
before
:
Schema.Type
;
db
:
Database
.
Database
;
object
:
Schema.Type
;
}
,
)
=>
Promise
<
void
>
;
to
:
To
;
transform
:
(
from
:
Schema.Type
,
context
:
Migration.ObjectMigrationContext
,
)
=>
Promise
<
Omit
<
Schema.Type
,
"id"
|
"~@dxos/echo/Kind"
>
>
;
}
,
)
=>
Migration.ObjectMigration
Type declaration
<
From
extends
Schema.AnyNoContext
,
To
extends
Schema.AnyNoContext
>
(
options
:
{
from
:
From
;
onMigration
:
(
params
:
{
before
:
Schema.Type
;
db
:
Database
.
Database
;
object
:
Schema.Type
;
}
,
)
=>
Promise
<
void
>
;
to
:
To
;
transform
:
(
from
:
Schema.Type
,
context
:
Migration.ObjectMigrationContext
,
)
=>
Promise
<
Omit
<
Schema.Type
,
"id"
|
"~@dxos/echo/Kind"
>
>
;
}
,
)
:
Migration.ObjectMigration
Type Parameters
From
extends
Schema.AnyNoContext
To
extends
Schema.AnyNoContext
Parameters
options
:
{
from
:
From
;
onMigration
:
(
params
:
{
before
:
Schema.Type
;
db
:
Database
.
Database
;
object
:
Schema.Type
;
}
,
)
=>
Promise
<
void
>
;
to
:
To
;
transform
:
(
from
:
Schema.Type
,
context
:
Migration.ObjectMigrationContext
,
)
=>
Promise
<
Omit
<
Schema.Type
,
"id"
|
"~@dxos/echo/Kind"
>
>
;
}
Returns
Migration.ObjectMigration
Deprecated
Import
Migration.define
from
@dxos/echo
instead.
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
@dxos/client
Loading...
Deprecated
Import
Migration.definefrom@dxos/echoinstead.