()
| 6 | public class AddFeatureFlags : Migration |
| 7 | { |
| 8 | public override void Up() |
| 9 | { |
| 10 | Create.Table("feature_flags") |
| 11 | .WithNanoIdColumn("id").PrimaryKey() |
| 12 | .WithNanoIdColumn("app_id").ForeignKey("apps", "id") |
| 13 | .WithColumn("key").AsString(255).NotNullable() |
| 14 | .WithColumn("value").AsString(4000).NotNullable() |
| 15 | .WithColumn("environment").AsString(50).NotNullable() |
| 16 | .WithColumn("conditions").AsString(4000).NotNullable() |
| 17 | .WithTimestamps(); |
| 18 | |
| 19 | Create.Index("idx_feature_flags_app_key_env") |
| 20 | .OnTable("feature_flags") |
| 21 | .OnColumn("app_id").Ascending() |
| 22 | .OnColumn("key").Ascending() |
| 23 | .OnColumn("environment").Ascending(); |
| 24 | } |
| 25 | |
| 26 | public override void Down() |
| 27 | { |
nothing calls this directly
no test coverage detected