Skip to content
Snippets Groups Projects
Select Git revision
  • 8cf355287d1e965ff43ecc51ac8c8524c41ce2a9
  • develop default protected
  • issue/139-dashboards
  • issue/111-gamificacao-banco
4 results

user-collection.seed.ts

Blame
  • user-collection.seed.ts 625 B
    import type db from '@/db'
    import userCollectionTable, { type userCollectionsInput } from '../relations/user-collections.relation'
    
    
    export default async function seed(db: db) {
      await db.insert(userCollectionTable).values(userCollectionsData)
    }
    
    const userCollectionsData: userCollectionsInput[] = [
      {
        user_id: 1,
        collection_id: 1
      },
      {
        user_id: 1,
        collection_id: 2
      },
      {
        user_id: 1,
        collection_id: 3
      },
      {
        user_id: 2,
        collection_id: 1
      },
      {
        user_id: 2,
        collection_id: 2
      },
      {
        user_id: 3,
        collection_id: 2
      },
      {
        user_id: 3,
        collection_id: 3
      }
    ]