feat: Initial project structure for Clima application
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using FluentMigrator;
|
||||
|
||||
namespace Clima.Database.Migrations
|
||||
{
|
||||
[Migration(20250725130000)]
|
||||
public class CreatePronosticoTable : Migration
|
||||
{
|
||||
private const string TableName = "Pronosticos";
|
||||
|
||||
public override void Up()
|
||||
{
|
||||
Create.Table(TableName)
|
||||
.WithColumn("Id").AsInt64().PrimaryKey().Identity()
|
||||
.WithColumn("Estacion").AsString(100).NotNullable()
|
||||
.WithColumn("FechaHora").AsDateTime2().NotNullable()
|
||||
.WithColumn("TemperaturaC").AsDecimal(5, 1).NotNullable()
|
||||
.WithColumn("VientoDirGrados").AsInt32().NotNullable()
|
||||
.WithColumn("VientoKmh").AsInt32().NotNullable()
|
||||
.WithColumn("PrecipitacionMm").AsDecimal(5, 1).NotNullable();
|
||||
|
||||
Create.Index($"IX_{TableName}_Estacion_FechaHora")
|
||||
.OnTable(TableName)
|
||||
.OnColumn("Estacion").Ascending()
|
||||
.OnColumn("FechaHora").Ascending();
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
Delete.Index($"IX_{TableName}_Estacion_FechaHora").OnTable(TableName);
|
||||
Delete.Table(TableName);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user