src/Migration/Schema/SnapshotSchema.php
public static function create($snapshotName = 'snapshot')
    {
        Schema::create($snapshotName, function (Blueprint $snapshot) use ($snapshotName) {
            // UUID4 of linked aggregate
            $snapshot->char('aggregate_id', 36);
            // Class of the linked aggregate
            $snapshot->string('aggregate_type', 150);
            // Version of the aggregate after event was recorded
            $snapshot->integer('last_version', false, true);
            // DateTime ISO8601 + microseconds UTC stored as a string e.g. 2016-02-02T11:45:39.000000
            $snapshot->char('created_at', 26);
            $snapshot->binary('aggregate_root');

            $snapshot->index(['aggregate_id', 'aggregate_type'], $snapshotName . '_m_v_uix');
        });
    }
public static function create($snapshotName = 'snapshot')
    {
        Schema::create($snapshotName, function (Blueprint $snapshot) use ($snapshotName) {
            // UUID4 of linked aggregate
            $snapshot->char('aggregate_id', 36);
            // Class of the linked aggregate
            $snapshot->string('aggregate_type', 150);
            // Version of the aggregate after event was recorded
            $snapshot->integer('last_version', false, true);
            // DateTime ISO8601 + microseconds UTC stored as a string e.g. 2016-02-02T11:45:39.000000
            $snapshot->char('created_at', 26);
            $snapshot->binary('aggregate_root');

            $snapshot->index(['aggregate_id', 'aggregate_type'], $snapshotName . '_m_v_uix');
        });
    }
public static function create ( $ snapshotName = 'snapshot' ) { Schema :: create ( $ snapshotName , function ( Blueprint $ snapshot ) use ( $ snapshotName ) { // UUID4 of linked aggregate $ snapshot -> char ( 'aggregate_id' , 36 ) ; // Class of the linked aggregate $ snapshot -> string ( 'aggregate_type' , 150 ) ; // Version of the aggregate after event was recorded $ snapshot -> integer ( 'last_version' , false , true ) ; // DateTime ISO8601 + microseconds UTC stored as a string e.g. 2016-02-02T11:45:39.000000 $ snapshot -> char ( 'created_at' , 26 ) ; $ snapshot -> binary ( 'aggregate_root' ) ; $ snapshot -> index ( [ 'aggregate_id' , 'aggregate_type' ] , $ snapshotName . '_m_v_uix' ) ; } ) ; }
Creates a snapshot schema

@param Schema $schema
@param string $snapshotName Defaults to 'snapshot'
Creates a snapshot schema