mirror of
				https://github.com/nkanaev/yarr.git
				synced 2025-10-30 22:43:29 +00:00 
			
		
		
		
	no more null dates
This commit is contained in:
		| @@ -12,6 +12,7 @@ var migrations = []func(*sql.Tx) error{ | ||||
| 	m03_on_delete_actions, | ||||
| 	m04_item_podcasturl, | ||||
| 	m05_move_description_to_content, | ||||
| 	m06_fill_missing_dates, | ||||
| } | ||||
|  | ||||
| var maxVersion = int64(len(migrations)) | ||||
| @@ -250,3 +251,11 @@ func m05_move_description_to_content(tx *sql.Tx) error { | ||||
| 	_, err := tx.Exec(sql) | ||||
| 	return err | ||||
| } | ||||
|  | ||||
| func m06_fill_missing_dates(tx *sql.Tx) error { | ||||
| 	sql := ` | ||||
| 		update items set date = 0 where date is null; | ||||
| 	` | ||||
| 	_, err := tx.Exec(sql) | ||||
| 	return err | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user