Ejemplo n.º 1
0
        protected override void BuildOperations(IDdlOperationBuilderSurface builder)
        {
            builder.Alter.Table("`Cat`").AddColumn("Color", c => c.String(255));

            builder.Create.Table("`Dog`", c => new
            {
                Id   = c.Int32(nullable: false),
                Name = c.String(255)
            }).PrimaryKey(x => x.Id, isIdentity: true);

            builder.Drop.Table("Frog");
        }
Ejemplo n.º 2
0
        protected override void BuildOperations(IDdlOperationBuilderSurface builder)
        {
            builder.Create.Table("`NHibernateMigrationHistory`", c => new
            {
                Context = c.String(255, nullable:false),
                Version = c.String(255, nullable: false),
                Configuration = c.BinaryBlob(2147483647)
            }).PrimaryKey(c => new{ c.Context, c.Version});

            builder.Create.Table("`Cat`", c => new
            {
                Id = c.Int32(nullable: false),
                Name = c.String(255)
            }).PrimaryKey(x => x.Id, isIdentity: true);
        }
Ejemplo n.º 3
0
        protected override void BuildOperations(IDdlOperationBuilderSurface builder)
        {
            builder.Create.Table("`NHibernateMigrationHistory`", c => new
            {
                Context       = c.String(255, nullable: false),
                Version       = c.String(255, nullable: false),
                Configuration = c.BinaryBlob(2147483647)
            }).PrimaryKey(c => new{ c.Context, c.Version });

            builder.Create.Table("`Cat`", c => new
            {
                Id   = c.Int32(nullable: false),
                Name = c.String(255)
            }).PrimaryKey(x => x.Id, isIdentity: true);
        }