Skip to content

Commit

Permalink
allow collection order
Browse files Browse the repository at this point in the history
  • Loading branch information
dromzeh committed Mar 20, 2024
1 parent c7be96b commit 22151a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scripts/seed/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,12 @@ async function main() {
.values([
{
collectionId: newUserCollections[0].id,
order: 0,
assetId: newAssets[0].id,
},
{
collectionId: newUserCollections[0].id,
order: 1,
assetId: newAssets[1].id,
},
])
Expand Down
1 change: 1 addition & 0 deletions src/v2/db/schema/collections/user-collections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export const userCollectionAsset = sqliteTable(
onUpdate: "cascade",
onDelete: "cascade",
}),
order: integer("order").notNull(),
dateAdded: text("date_added")
.notNull()
.$defaultFn(() => {
Expand Down

0 comments on commit 22151a6

Please sign in to comment.