Skip to content
Snippets Groups Projects

Topic/776 s3 resource url

Merged L. Ellenbeck requested to merge Topic/776-s3ResourceUrl into Product/772-s3ResourceUrl
2 files
+ 21
0
Compare changes
  • Side-by-side
  • Inline

Files

 
using FluentMigrator;
 
namespace Coscine.Database.Migration.Migrations
 
{
 
//yyyymmddhhmm
 
[Migration(202004151354)]
 
public class Migration202004151354S3ResourceUrl : FluentMigrator.Migration
 
{
 
public override void Down()
 
{
 
Delete.Column("ResourceUrl").FromTable("S3ResourceType");
 
}
 
 
public override void Up()
 
{
 
Alter.Table("S3ResourceType").AddColumn("ResourceUrl").AsString(200).Nullable();
 
Update.Table("S3ResourceType").Set(new { ResourceUrl = "https://s3.rwth-aachen.de" }).AllRows();
 
Alter.Table("S3ResourceType").AlterColumn("ResourceUrl").AsString(200).NotNullable();
 
}
 
}
 
}
Loading