File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ use std::fmt::Formatter;
1414
1515/// An enum set that represents the type of the Migration
1616#[ derive( Clone , PartialEq ) ]
17+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
1718pub enum Type {
1819 Versioned ,
1920 Unversioned ,
@@ -51,6 +52,7 @@ pub enum Target {
5152// an Enum set that represents the state of the migration: Applied on the database,
5253// or Unapplied yet to be applied on the database
5354#[ derive( Clone , Debug ) ]
55+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
5456enum State {
5557 Applied ,
5658 Unapplied ,
@@ -62,6 +64,7 @@ enum State {
6264///
6365/// [`embed_migrations!`]: macro.embed_migrations.html
6466#[ derive( Clone , Debug ) ]
67+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
6568pub struct Migration {
6669 state : State ,
6770 name : String ,
You can’t perform that action at this time.
0 commit comments