Deployment and lifecycle management for Nix
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: add SID prefixes to all schemas missing them

user → user_, user_token → utok_, nix_cache → nxc_,
forge_connection → forg_, repository → repo_

access_token left unprefixed by design (SID is part of the full token).
nix eval request left as-is.

sow-159

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+15 -2
.dexter.db-shm

This is a binary file and will not be displayed.

+1
apps/sower/lib/sower/accounts/access_token.ex
··· 12 12 @derive {Phoenix.Param, key: :sid} 13 13 14 14 schema "access_tokens" do 15 + # unnamed sid since the full token has its own prefix 15 16 field :sid, SowerClient.Sid, autogenerate: true 16 17 field :expires_at, :date 17 18 field :description, :string
+1 -1
apps/sower/lib/sower/accounts/user.ex
··· 31 31 end 32 32 33 33 def new(attrs) do 34 - %User{} 34 + %User{sid: SowerClient.Sid.generate("user")} 35 35 |> changeset(attrs) 36 36 |> Repo.insert() 37 37 end
+10 -1
apps/sower/lib/sower/accounts/user_token.ex
··· 47 47 """ 48 48 def build_session_token(user) do 49 49 token = :crypto.strong_rand_bytes(@rand_size) 50 - {token, %UserToken{token: token, context: "session", user_id: user.id, org_id: user.org_id}} 50 + 51 + {token, 52 + %UserToken{ 53 + sid: SowerClient.Sid.generate("utok"), 54 + token: token, 55 + context: "session", 56 + user_id: user.id, 57 + org_id: user.org_id 58 + }} 51 59 end 52 60 53 61 @doc """ ··· 91 99 92 100 {Base.url_encode64(token, padding: false), 93 101 %UserToken{ 102 + sid: SowerClient.Sid.generate("utok"), 94 103 token: hashed_token, 95 104 context: context, 96 105 sent_to: sent_to,
+2
apps/sower/lib/sower/forge.ex
··· 115 115 """ 116 116 def create_connection(attrs \\ %{}) do 117 117 %Connection{ 118 + sid: SowerClient.Sid.generate("forg"), 118 119 org_id: Sower.Repo.get_org_id() 119 120 } 120 121 |> Connection.changeset(attrs) ··· 263 264 """ 264 265 def create_repository(attrs \\ %{}) do 265 266 %Repository{ 267 + sid: SowerClient.Sid.generate("repo"), 266 268 org_id: Sower.Repo.get_org_id(), 267 269 webhook_secret: 64 |> :crypto.strong_rand_bytes() |> Base.url_encode64(padding: false) 268 270 }
+1
apps/sower/lib/sower/nix.ex
··· 83 83 """ 84 84 def create_cache(attrs \\ %{}) do 85 85 %Cache{ 86 + sid: SowerClient.Sid.generate("nxc"), 86 87 org_id: Sower.Repo.get_org_id() 87 88 } 88 89 |> Cache.changeset(attrs)