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

Class MigrationExtensions

src/Data/Migrations/MigrationExtensions.cs:6–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4namespace Aptabase.Data.Migrations;
5
6internal static class MigrationExtensions
7{
8 public static ICreateTableColumnOptionOrWithColumnSyntax WithNanoIdColumn(this ICreateTableWithColumnSyntax tableWithColumnSyntax, string name)
9 {
10 return tableWithColumnSyntax
11 .WithColumn(name)
12 .AsString(22)
13 .NotNullable();
14 }
15
16 public static ICreateTableColumnOptionOrWithColumnSyntax WithTimestamps(this ICreateTableWithColumnSyntax tableWithColumnSyntax)
17 {
18 return tableWithColumnSyntax
19 .WithColumn("created_at").AsDateTimeOffset().WithDefault(SystemMethods.CurrentUTCDateTime).NotNullable()
20 .WithColumn("modified_at").AsDateTimeOffset().WithDefault(SystemMethods.CurrentUTCDateTime).NotNullable();
21 }
22}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected