Oliver Walters 
							
						 
					 
					
						
						
							
						
						3c5169c793 
					 
					
						
						
							
							So I learned something today...  
						
						 
						
						... 
						
						
						
						In migration files you can access the "historical" pythonic model, and use that, with *all* the helpers,
rather than writing clunky old SQL!!!!
:'( 
						
						
					 
					
						2021-02-04 23:10:10 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						74704a7c1e 
					 
					
						
						
							
							Mark migrations with data operations "non atomic"  
						
						 
						
						... 
						
						
						
						Ref: https://docs.djangoproject.com/en/dev/howto/writing-migrations/#non-atomic-migrations  
						
						
					 
					
						2021-02-04 22:19:15 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						140c8b5395 
					 
					
						
						
							
							Use integer field instead of boolean literal (not correct SQL)  
						
						 
						
						
						
						
					 
					
						2021-02-04 21:33:10 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						d811f3c48a 
					 
					
						
						
							
							Typo fix  
						
						 
						
						... 
						
						
						
						(cherry picked from commit c58399206c ) 
						
						
					 
					
						2021-02-04 08:39:27 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						93f0dbd4ee 
					 
					
						
						
							
							Bug fix: add missing line  
						
						 
						
						... 
						
						
						
						(cherry picked from commit 2303e03580 ) 
						
						
					 
					
						2021-02-04 08:39:20 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						ad0b59bf11 
					 
					
						
						
							
							Bug fxi  
						
						 
						
						... 
						
						
						
						(cherry picked from commit 0e11b722be ) 
						
						
					 
					
						2021-02-04 08:39:14 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						b284fe7f2b 
					 
					
						
						
							
							Remove quotes around column names  
						
						 
						
						... 
						
						
						
						(cherry picked from commit 386cb2dd3a ) 
						
						
					 
					
						2021-02-04 08:39:05 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						34dbfe6d28 
					 
					
						
						
							
							Test troublesome migration 0019  
						
						 
						
						
						
						
					 
					
						2021-02-03 23:16:23 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						5e9097b5e0 
					 
					
						
						
							
							PSQL: Upper-case column names *must* be qualified with double-quotes  
						
						 
						
						... 
						
						
						
						Ref: https://www.xspdf.com/resolution/53039249.html  
						
						
					 
					
						2021-02-03 13:16:32 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						0e246a7fdf 
					 
					
						
						
							
							Migration fix (response is different for postgresql)  
						
						 
						
						
						
						
					 
					
						2021-02-03 13:02:28 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						793e5b820e 
					 
					
						
						
							
							Remove all model references from migration file  
						
						 
						
						
						
						
					 
					
						2021-02-03 11:56:48 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						bc43d14ebf 
					 
					
						
						
							
							Change model functions to raw SQL  
						
						 
						
						
						
						
					 
					
						2021-02-03 11:28:43 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						f798537c73 
					 
					
						
						
							
							Reverse migration company.0024  
						
						 
						
						
						
						
					 
					
						2021-02-03 09:52:59 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						2a91bb0c87 
					 
					
						
						
							
							Update SupplierPart model to allow data importing  
						
						 
						
						... 
						
						
						
						- django-import-export plugin seems to require null=True for char fields
- yes, this goes against django "best practice"
- Hopefully a better solution can be found 
						
						
					 
					
						2021-01-03 22:16:32 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						599220a931 
					 
					
						
						
							
							Fixes for custom SQL queries  
						
						 
						
						... 
						
						
						
						- Don't use double quotes!
- NO NO NO!
- Single quotes only 
						
						
					 
					
						2020-11-19 09:15:16 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						51d2d85c26 
					 
					
						
						
							
							When creating a new price break for a supplier part, default to using the currency code specified for the supplier company  
						
						 
						
						
						
						
					 
					
						2020-11-12 11:14:50 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						1532be9c1e 
					 
					
						
						
							
							Add 'currency' option for company  
						
						 
						
						... 
						
						
						
						- e.g. an external supplier might have a default currency
- Adds a form input which only allows selection of allowed currency codes
- Add unit testing for currency validation 
						
						
					 
					
						2020-11-12 11:02:10 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						fc89501a62 
					 
					
						
						
							
							Fix for SQL cursor query  
						
						 
						
						... 
						
						
						
						- What works in SQLite don't necessarily fly with the big boys 
						
						
					 
					
						2020-11-11 08:06:14 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						4dff18e4a6 
					 
					
						
						
							
							Remove common_currency model entirely  
						
						 
						
						... 
						
						
						
						- A lot of views / pages / etc needed to be updated too
- Now uses django-money fields entirely
- Create a manual rate exchange backend (needs more work!) 
						
						
					 
					
						2020-11-11 00:21:06 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						83582ae87f 
					 
					
						
						
							
							Add custom migration for the part_supplierpricebreak model  
						
						 
						
						... 
						
						
						
						- Copies across existing pricing data
- Yikes 
						
						
					 
					
						2020-11-10 22:25:05 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								eeintech 
							
						 
					 
					
						
						
							
						
						5793839a01 
					 
					
						
						
							
							Added UniqueConstraint on name/email pair, renamed migration file  
						
						 
						
						
						
						
					 
					
						2020-10-20 07:37:07 -05:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								eeintech 
							
						 
					 
					
						
						
							
						
						70a3b7f891 
					 
					
						
						
							
							Improved migration, still fails if email duplicates exist in current DB  
						
						 
						
						
						
						
					 
					
						2020-10-13 07:43:57 -05:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								eeintech 
							
						 
					 
					
						
						
							
						
						ac82640c6c 
					 
					
						
						
							
							Company: allowed duplicate names, made email field unique, custom migration  
						
						 
						
						
						
						
					 
					
						2020-10-12 17:51:48 -05:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						2039100d3e 
					 
					
						
						
							
							Add some unit testing  
						
						 
						
						
						
						
					 
					
						2020-10-04 00:24:48 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						19c036f50a 
					 
					
						
						
							
							Add migration files  
						
						 
						
						
						
						
					 
					
						2020-08-08 17:16:04 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						dedc25d681 
					 
					
						
						
							
							Update verbose names for some fields  
						
						 
						
						
						
						
					 
					
						2020-06-13 20:46:19 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						af00d88555 
					 
					
						
						
							
							Bug fix for custom migration  
						
						 
						
						... 
						
						
						
						Ref: https://stackoverflow.com/questions/13410982/attributeerror-long-object-has-no-attribute-fetchall#13411358  
						
						
					 
					
						2020-05-01 15:57:10 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						653d502a73 
					 
					
						
						
							
							Fix the manufacturer migration so it reverses properly  
						
						 
						
						
						
						
					 
					
						2020-04-13 23:58:10 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						3b08b962c1 
					 
					
						
						
							
							Fix order of operations  
						
						 
						
						
						
						
					 
					
						2020-04-13 23:19:23 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						fb8c0e5180 
					 
					
						
						
							
							Fix buggy migration  
						
						 
						
						... 
						
						
						
						- Need to use raw SQL queries as the database model does not match the python model 
						
						
					 
					
						2020-04-13 22:53:14 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						9c7813992d 
					 
					
						
						
							
							Remove old 'manufacturer_name' field  
						
						 
						
						
						
						
					 
					
						2020-04-13 20:26:24 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						8fa3d77416 
					 
					
						
						
							
							Short-circuit the custom migration if there are no SupplierPart objects  
						
						 
						
						... 
						
						
						
						- This allows the unit testing to run!
(cherry picked from commit f243b567fd ) 
						
						
					 
					
						2020-04-13 20:21:04 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						696c101628 
					 
					
						
						
							
							Change related name for SuppleirPart.supplier  
						
						 
						
						... 
						
						
						
						(cherry picked from commit 635c4339e0 ) 
						
						
					 
					
						2020-04-13 20:20:28 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						4e3825682a 
					 
					
						
						
							
							Doc fix for mgiration  
						
						 
						
						... 
						
						
						
						(cherry picked from commit 6ef32dfa2d ) 
						
						
					 
					
						2020-04-13 20:20:18 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						04097791bb 
					 
					
						
						
							
							Custom migration for walking user through the process of mapping supplierpart to manufacturer  
						
						 
						
						... 
						
						
						
						(cherry picked from commit 290002fe9d ) 
						
						
					 
					
						2020-04-13 20:20:13 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						2695368651 
					 
					
						
						
							
							Add migration to create a 'manufacturer' field to the SupplierPart model  
						
						 
						
						... 
						
						
						
						(cherry picked from commit 890e938662 ) 
						
						
					 
					
						2020-04-13 20:20:08 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						00315aa855 
					 
					
						
						
							
							Add 'manufacturer' field to SupplierPart object  
						
						 
						
						... 
						
						
						
						- ForeignKey link to Company model
(cherry picked from commit acebe61ac5 ) 
						
						
					 
					
						2020-04-13 20:20:04 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						8b366fc4a0 
					 
					
						
						
							
							Rename "manufacturer" to "manufacturer_name"  
						
						 
						
						... 
						
						
						
						(cherry picked from commit e9e734acce ) 
						
						
					 
					
						2020-04-13 20:19:59 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						094a0fe709 
					 
					
						
						
							
							Improvements to company API  
						
						 
						
						... 
						
						
						
						- Filter by is_manufacturer
- Better table display
(cherry picked from commit f427ee4754 ) 
						
						
					 
					
						2020-04-13 20:19:10 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						906ed7f64d 
					 
					
						
						
							
							Add "is_manufacturer" field to company model  
						
						 
						
						... 
						
						
						
						(cherry picked from commit fd45db9e22 ) 
						
						
					 
					
						2020-04-13 20:19:03 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						1a233e7949 
					 
					
						
						
							
							Create thumbnails for Company model  
						
						 
						
						
						
						
					 
					
						2020-04-07 11:17:00 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						a306ad0bc3 
					 
					
						
						
							
							Alter "URL" to "link" for Company models  
						
						 
						
						
						
						
					 
					
						2020-04-06 11:36:25 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						6731bc1b06 
					 
					
						
						
							
							Implement auto-rounding decimal field  
						
						 
						
						... 
						
						
						
						Ref: https://stackoverflow.com/questions/37958130/automatically-round-djangos-decimalfield-according-to-the-max-digits-and-decima  
						
						
					 
					
						2020-03-18 22:22:40 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						ca9f9e047c 
					 
					
						
						
							
							Make company notes field markdownable  
						
						 
						
						
						
						
					 
					
						2020-02-01 23:31:45 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						381becef79 
					 
					
						
						
							
							Convert some more fields to decimal  
						
						 
						
						... 
						
						
						
						- purchase order line item quantity
- purchase order line item received 
						
						
					 
					
						2019-11-19 10:30:04 +11:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						70e07470db 
					 
					
						
						
							
							Custom URL validators for more fields  
						
						 
						
						
						
						
					 
					
						2019-09-14 00:08:49 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						91453094aa 
					 
					
						
						
							
							Remove lead-time field  
						
						 
						
						
						
						
					 
					
						2019-09-12 22:37:09 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						c6a435eba0 
					 
					
						
						
							
							Add currency field to SupplierPriceBreak  
						
						 
						
						
						
						
					 
					
						2019-09-03 09:34:32 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						c45a506a10 
					 
					
						
						
							
							Rename field part.has_variants to part.is_template  
						
						 
						
						
						
						
					 
					
						2019-05-25 23:58:31 +10:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Oliver Walters 
							
						 
					 
					
						
						
							
						
						c3d75deb16 
					 
					
						
						
							
							More 'limit_choices_to' limitations for template parts  
						
						 
						
						
						
						
					 
					
						2019-05-25 23:55:16 +10:00