MCPcopy Create free account
hub / github.com/aptabase/aptabase / Up

Method Up

src/Data/Migrations/0006_AddSubscriptions.cs:8–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6public class AddSubscriptions : Migration
7{
8 public override void Up()
9 {
10 Create.Table("subscriptions")
11 .WithColumn("id").AsInt64().NotNullable().PrimaryKey()
12 .WithNanoIdColumn("owner_id").NotNullable()
13 .WithColumn("customer_id").AsInt64().NotNullable()
14 .WithColumn("product_id").AsInt64().NotNullable()
15 .WithColumn("variant_id").AsInt64().NotNullable()
16 .WithColumn("status").AsString().NotNullable()
17 .WithColumn("ends_at").AsDateTimeOffset().Nullable()
18 .WithTimestamps();
19
20 Create.Index("idx_subscriptions_owner")
21 .OnTable("subscriptions")
22 .OnColumn("owner_id");
23 }
24
25 public override void Down()
26 {

Callers

nothing calls this directly

Calls 2

WithTimestampsMethod · 0.80
WithNanoIdColumnMethod · 0.80

Tested by

no test coverage detected