mirror of
				https://github.com/yanislav-igonin/micrach
				synced 2025-10-27 17:07:03 +03:00 
			
		
		
		
	minimize seeds count
This commit is contained in:
		
							parent
							
								
									41675a63fc
								
							
						
					
					
						commit
						cc5ded555a
					
				| @ -75,7 +75,7 @@ func seedLocal() { | |||||||
| func seedDb() { | func seedDb() { | ||||||
| 	// preparing seed data with parent posts with files
 | 	// preparing seed data with parent posts with files
 | ||||||
| 	var parentPosts []Post | 	var parentPosts []Post | ||||||
| 	for i := 1; i < 100; i++ { | 	for i := 1; i < 10; i++ { | ||||||
| 		post := getPost(i, nil) | 		post := getPost(i, nil) | ||||||
| 		parentPosts = append(parentPosts, post) | 		parentPosts = append(parentPosts, post) | ||||||
| 	} | 	} | ||||||
| @ -97,7 +97,7 @@ func seedDb() { | |||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		// making child posts
 | 		// making child posts
 | ||||||
| 		for i := 0; i < 100; i++ { | 		for i := 0; i < 10; i++ { | ||||||
| 			// getting child post with files
 | 			// getting child post with files
 | ||||||
| 			childPost := getPost(0, &parentPostID) | 			childPost := getPost(0, &parentPostID) | ||||||
| 			childPostID, err := Posts.Create(childPost) | 			childPostID, err := Posts.Create(childPost) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Yanislav Igonin
						Yanislav Igonin