I've recently migrated my tools project from an old the server to a new one.
In the process I've decided to change the used database from MySQL to PostgreSQL.
To do so I've used this amazing guide from calazan.com.
As the guide was written for django 1.6 some minor changes were necessary when working with newer versions (I've used django 3.1.4).
Setup for migration
Steps 1 + 2 work as described in the guide above. A new database is created and added to the settings.py.
syncdb is no longer available in newer django versions and was replaced by migrate.
The flag --no-initial-data is no longer available and I didn't find a substitution.
Clean Up the new database
Some migrations will create initial data in your database. This will probably create conflicts, as we are migrating existing data into this database.
I did this step by hand, but the command python manage.py sqlflush --database=postgresql will give you the SQL query to do it automatically.
Copy data to new database
In order to copy the data we use dumpdata and loaddata.
When dumping the data it is important to use the flag --natural-foreign, otherwise the import process cannot import data with foreign keys.
The dumped data can be loaded into the new database. This process can take a long time. Ensure that your machine executing this command is as close as possible to the database, ideally running on the same machine. First, I started this command on my local machine. After 30 minutes I decided that it took too long and uploaded the dump to the server running the database, which finished the command in about a minute. My dump file was only 16 MB big.
Um die Ergebnisse der Kommunalwahlen in Aachen besser zu verstehen habe ich die Ergebnisse der einzelnen Stimmbezirke in einer Kartenansicht visualisiert. Hierbei habe ich für jede Partei eine Grafik erstellt, die zeigt wo die Partei besonders stark ist.
![Karte mit Wahlergebnissen für Städteregion Aachen: CDU](media/Städteregion: CDU.png)
![Karte mit Wahlergebnissen für Städteregion Aachen: GRÜNE](media/Städteregion: GRÜNE.png)
![Karte mit Wahlergebnissen für Städteregion Aachen: SPD](media/Städteregion: SPD.png)
![Karte mit Wahlergebnissen für Städteregion Aachen: LINKE](media/Städteregion: LINKE.png)
![Karte mit Wahlergebnissen für Städteregion Aachen: FDP](media/Städteregion: FDP.png)
![Karte mit Wahlergebnissen für Städteregion Aachen: PIRATEN](media/Städteregion: PIRATEN.png)
![Karte mit Wahlergebnissen für Städteregion Aachen: UWG](media/Städteregion: UWG.png)
![Karte mit Wahlergebnissen für Städteregion Aachen: AfD](media/Städteregion: AfD.png)
![Karte mit Wahlergebnissen für Städteregion Aachen: PARTEI](media/Städteregion: PARTEI.png)
This is my pizza recipe for an easy to prepare lunch. It takes 15 minutes to prepare the dough. I typically prepare enough dough for 4 servings. The dough can be stored for several days and improves each day ;).
Add water and oil to the dry ingredients and mix everything
Once all liquid is absorbed start kneading the dough until you reach an even consistency
Put your dough in the fridge overnight
Cooking
In the morning take 275g of your dough out of the fridge. Fold or knead it shortly to create a round ball. Put the ball into a bowl and cover it.
After 1-3 hours fold the dough once. Be careful to keep the air building up!
Preheat your oven to 250°C (20-30 minutes before your lunch).
Put the dough ball on a floured surface and carefully push and pull it into shape. Be gentle and keep as much air as possible inside the dough! Put the pizza dough on your baking sheet.
Coat the pizza lightly with olive oil. Add 3-5 tablespoon passata and spread it evenly. You don't need a lot of sauce, only cover the dough lightly.
Season the sauce with salt, pepper and oregano (I also add chili). Add your ingredients and cheese.
Paul Graham wrote an article about wealth tax. In the article he 'models' the effect of a wealth tax on the fortune of a person. His assumption for the modeling is a person who earned a lot of money with a startup in her 20s. Paul Graham shows how much of the earned stocks/money would be taken by the government by a wealth tax.
Paul Graham comes to the conclusion that wealth taxes have "dramatic effects" and that "even a .5% wealth tax would start to keep founders away from a state or country that imposed it."
I think this conclusion is wrong. His model assumes that the earned money just lies on a big pile and is not used for 60 years. A more reasonable model would include interest being earn with the money. For this I will use an extended model:
(growth * (1-wealth_tax)^years
If we assume a reasonable return of investment of 2% per year the number shifts dramatically. Instead of "losing" 25% at 0.5% wealth tax you end up with 242% of your original value after 60 years. Even a wealth tax of 3% would only half your wealth.
Wealth Tax
Graham Model
With 2% Interest
0.10%
94.17%
308.99%
0.50%
74.03%
242.88%
1.00%
54.72%
179.52%
2.00%
29.76%
97.63%
3.00%
16.08%
52.76%
4.00%
8.64%
28.33%
5.00%
4.61%
15.12%
Paul Graham's article also misses to mention that a wealth tax only affect people with ALOT of money. Elizabeth Warren's "Ultra-Millionaire Tax" would only tax assets over $50 million. Once you are affected by a wealth tax you have enough money to live a luxurious life (and your children will probably never have to work to live). Most startup founders never reach this amount of wealth.
As this tax only targets the super rich let's look at the effect this tax would have on Jeff Bezos (data source: Wikipedia):
Even a high wealth tax of 5% leaves Bezos the majority of his wealth. If Bezos stopped earning new wealth in 2018 he could bequeath $30 billion to his children in 2080 with a 2% wealth tax. With a 5% wealth tax his children would still inherit over $4 billion!
The questions I'm asking myself when thinking about a wealth tax are the following:
Should a person have virtually unlimited resources for the rest of her life, just because she had a clever idea in her 20s?
Should children have virtually unlimited resources for the rest of their lives, just because one of their parents had a clever idea in her 20s?
Should grandchildren have virtually unlimited resources for the rest of their lives, just because one of their grandparents had a clever idea in her 20s?