From 5d467d950fd4078146709470084cbfae331b8b10 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 14 Jun 2020 14:21:44 +0800 Subject: refactor(back): No longer use standard guid but just use 32-length hex for unique id of timeline. --- Timeline/Migrations/DatabaseContextModelSnapshot.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Timeline/Migrations/DatabaseContextModelSnapshot.cs') diff --git a/Timeline/Migrations/DatabaseContextModelSnapshot.cs b/Timeline/Migrations/DatabaseContextModelSnapshot.cs index 111ae9c2..ea0b58c6 100644 --- a/Timeline/Migrations/DatabaseContextModelSnapshot.cs +++ b/Timeline/Migrations/DatabaseContextModelSnapshot.cs @@ -89,11 +89,12 @@ namespace Timeline.Migrations .HasColumnName("owner") .HasColumnType("INTEGER"); - b.Property("UniqueId") + b.Property("UniqueId") + .IsRequired() .ValueGeneratedOnAdd() .HasColumnName("unique_id") - .HasColumnType("BLOB") - .HasDefaultValueSql("randomblob(16)"); + .HasColumnType("TEXT") + .HasDefaultValueSql("lower(hex(randomblob(16)))"); b.Property("Visibility") .HasColumnName("visibility") -- cgit v1.2.3