Skip to content

Commit 7cc884c

Browse files
committed
make sp table id random uuid
1 parent 735f589 commit 7cc884c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.sqlx/query-c3f055777ef017282ee244247417aefb57add7148b2b65bf82bd92f9db8c514d.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

migrations/20251106110552_create_storage_providers.up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- Create storage_providers table
22
CREATE TABLE storage_providers (
3-
id BIGSERIAL PRIMARY KEY,
3+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
44
provider_id VARCHAR(255) NOT NULL UNIQUE,
55

66
-- URL discovery schedule

url_finder/src/repository/storage_provider_repo.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ use color_eyre::Result;
33
use serde::{Deserialize, Serialize};
44
use sqlx::PgPool;
55
use utoipa::ToSchema;
6+
use uuid::Uuid;
67

78
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema, sqlx::FromRow)]
89
pub struct StorageProvider {
9-
pub id: i64,
10+
pub id: Uuid,
1011
pub provider_id: String,
1112
pub next_url_discovery_at: DateTime<Utc>,
1213
pub url_discovery_status: Option<String>,

0 commit comments

Comments
 (0)