@pythonbytes a small shameless plug to follow up on episode 444 on the topic of squashing Django migrations https://github.com/browniebroke/django-remake-migrations
@mkennedy @brianokken
#django #migrations

@pythonbytes a small shameless plug to follow up on episode 444 on the topic of squashing Django migrations https://github.com/browniebroke/django-remake-migrations
@mkennedy @brianokken
#django #migrations
L’Arizona belge : radiographie d’une politique migratoire répressive, raciste et inhumaine
Le 31 janvier 2025, le nouveau gouvernement fédéral dévoile enfin son accord de coalition tant attendu. Dès les premières (...)
#Extrême #Droite #Antifascisme #Racismes #Colonialismes #Médias #Migrations #Frontières #RésistancesEtSolidaritésInternationales #Prisons #Anticarcéral
https://stuut.info/7415
Von #Republik @republik_magazin
Moralische Korruption.
Das erste gesamtschweizerische «#Ausländer»-Gesetz von 1934 war auf eine rassistische «#Auslese»-Ideologie gegründet, die kaum aufgearbeitet ist. Das Gesetz prägt die Schweizer #Migrationspolitik und den Diskurs um angebliche «#Überfremdung» bis heute. Eine Intervention.
Von Melinda Nadj Abonji, 21.06.2025
Wunderbarer Text von #MelindaNadjAbonji, unbedingt lesen!
"Engaging the public is vital because the histories we study are often directly linked to current global debates and media narratives. The themes we explore - #colonialism, #religion, #nationalism, #migrations - are relevant to current public debates, yet often misunderstood or oversimplified [...]."
In our #OpenScience Blog, Karène Sanchez-Summerer, historian of the Modern Middle East, shares experiences and motivations behind her open science initiatives.
https://www.rug.nl/library/open-access/blog/making-history-accessible-interview-with-karene-sanchez-summerer #histodons
"Each spring, billions of Bogong moths (Agrotis infusa) migrate hundreds of kilometres south to the Australian Alps, guided by the austral night sky. The discovery that they can find their way using only the stars — reported in an 18 June Nature paper — makes this moth the first invertebrate to be observed using celestial navigation for long-distance journeys."
Message à faire passer aux étrangers en situation difficile : pendant 48H au moins (de maintenant jusqu'au 20 juin au minimum), opérations de contrôles de police d'envergure les visant dans toute la France.
O concurso para um/a Investigador/a Auxiliar na área temática "História — Migrações e Globalização em Perspectiva Histórica", posição financiada pelo programa #FCTTenure, foi reaberto devido a uma falha na publicação do edital original.
O novo prazo é 18 de Junho
Expulsion à Ganshoren : Le communiqué du collectif
Expulsion sans négociations ni solution de relogement à Ganshoren pour plus de 40 enfants et femmes dont certaines enceintes, tous et toutes traumatisés. l’Etat belge et sa (...)
#Racismes #Colonialismes #Logement #Squat #ContrôleSocial #Répression #Migrations #Frontières #Classisme #LutteDesClasses #ViolencesPolicières
https://stuut.info/6819
Today is #FridayReading. I highly recommend this powerful and radical book by Henk Van Houten. #RadicalCartography #Migrations
Human use of fire has produced an era of uncontrolled burning: Welcome to the #Pyrocene
by Stephen Pyne, The Conversation, January 22, 2025
"#LosAngeles is burning, but it isn't alone. In recent years, fires have blasted through cities in #Colorado, the southern #Appalachians and the island of #Maui, along with #Canada, #Australia, #Portugal and #Greece. What wasn't burned was smoked in.
"Is this another case of a future not only dire but strange, without a narrative to join past to present or an analog for what is to come?
"I'm a historian of fire, and my reply is that we have both a narrative and an analog. The narrative is the unbroken saga of humanity and fire, a companionship that extends through all our existence as a species. The analog is that humanity's fire practices have become so vast, especially in recent centuries, that we are creating the fire equivalent of an ice age."
[...]
Welcome to the Pyrocene
"Widen the aperture a bit, and we can envision Earth entering a fire age comparable to the ice ages of the Pleistocene, complete with the pyric equivalent of ice sheets, pluvial lakes, periglacial outwash plains, mass extinctions and sea-level changes. It's an epoch in which fire is both prime mover and principal expression.
"Humanity's firepower underpins the #Anthropocene, which is the outcome not just of #anthropogenic meddling but of a particular kind of meddling, made possible by humans' species monopoly over fire. Even climate history has become a subset of fire history.
"Fires in living landscapes, fires burning lithic landscapes—the interaction of these two realms of fire has not been much studied. It's been enough of a stretch to fully include human fire practices within traditional ecology. Yet humans—the keystone species for fire on Earth—are merging the two arenas of earthly burning with a give and take that is reshaping the planet in what resembles a slow-motion #Ragnarok.
"Add up all the effects, direct and indirect: the ice driven off by fire, the areas burning, the biogeographical #migrations as biotas move to accommodate changed conditions, the collateral impacts with damaged #watersheds and #airsheds, the unraveling of #ecosystems, the pervasive power of #ClimateChange, #RisingSeaLevels, a #MassExtinction, the disruption of human life and habitats. The result is a #pyrogeography that looks eerily like an ice age for fire. You have a maturing Pyrocene.
"If you doubt it, just ask California."
Full article (it's a good read):
https://phys.org/news/2025-01-human-era-uncontrolled-pyrocene.html
#Wildfires #UncontrolledFires #HistoryOfFire #PyroceneEra #ControlledBurning #ClimateCrisis
Ce 20 janvier 2025, on va beaucoup parler #frontières #migrations #préjugés
Normal, c'est le jour d'investiture de la nouvelle édition du guide ritimo "Répondre aux préjugés sur les migrations"
Cette nouvelle édition mise à jour et augmentée (avec de nouveaux dessins de Claire Robert) veut démonter les raccourcis et les idées reçues les plus courantes sur les migrations.
Disponible sur notre site : https://www.ritimo.org/Repondre-aux-prejuges-sur-les-migrations
Et par ici : https://www.comprendrepouragir.org/produit/repondre-aux-prejuges-sur-les-migrations/
"The economy is top of mind for #voters this year, and experts say that #ClimateChange has the potential for "significant economic harm."
Climate change is making home ownership more expensive [by rsising] #HomeInsurance premiums
In the most pessimistic of scenarios, experts estimate that Latin America will have 17 million climate migrants by 2050, as climate impacts will force #migrations across other continents."
https://www.cbsnews.com/news/climate-election-impact-food-electric-bills-economy/
I saw a recent water map based on rising tides from glaciers melt. New Orleans is literally under water. Sooooo.
People don't understand what's coming...#migrations
Generic Repository Pattern in C#
Have you ever dreaded writing the same boilerplate repository code repeatedly? You’re not alone; I will share my implementation of the Code First Generic Repository Pattern in C#. I will only include some of the code because it will make the post incredibly long. At the end of the post, I will share a Goal donation to post a Git download link so you can take it for a spin. As a bonus, the repository uses Code First and Unit of Work.
Generic Repository Pattern in C#
Let’s begin with the Entity interface. The IEntity interface is a typical pattern used in software development to define a contract for entities, typically in the context of data access and persistence. It usually includes a property for the entity’s unique identifier. The Generic Type: The IEntity interface uses a generic type parameter TKey to allow flexibility in the type of the identifier (e.g., int, Guid, string). The ID property will identify each entity uniquely. Feel free to read more about the implementation at the entity framework core generic repository and Structured Query IEntity.
public interface IEntity<TKey>{ TKey Id { get; set; }}
You might find the following definition of the generic repository pattern on the interwebs.
The Generic Repository pattern in C# is a design pattern that abstracts the application’s data layer, making it easier to manage data access logic across different data sources. It aims to reduce redundancy by implementing typical data operations in a single, generic repository rather than having separate repositories for each entity type.
public interface IGenericRepository<TEntity, TKey> where TEntity : class, IEntity<TKey>{ void Delete(TEntity entityToDelete); TEntity? GetFirstOrDefault(Expression<Func<TEntity, bool>> predicate); void Update(TEntity entityToUpdate); void Save(); void Dispose();}
The interface header has two generic types. TEntity is the domain class, and the TKey is the ID type, int, or string. Note that IEntity abstracts away the type TKey. It looks complex for the moment, but you will see benefits later.
Moving away from the Generic Repository, let’s focus on the pattern of the Unit of Work. According to Copilot:
The Unit of Work is a design pattern used in software development to manage and coordinate changes to a database. It ensures that all operations within a single business transaction are treated as a single unit, which means they either all succeed, or all fail together. This helps maintain data integrity and consistency.
public interface IUnitOfWork : IDisposable{ IGenericRepository<TEntity, TKey> Repository<TEntity, TKey>() where TEntity : class, IEntity<TKey>; void Save(); Task<int> SaveAsync();}
The Unit of Work will allow us later to inject it as a service for any repository. If you inspect the interface closely, you will notice it has three fields. The most vital of the three is the Repository. The method returns a domain of type repository and key. You can specify the type when using it.
Moving on to the Code First portion, we must tell Entity Framework how to build our database. To do so, we can create a “BloggingContext”.
public class BloggingContext: DbContext{ // Use design time factory public BloggingContext(DbContextOptions<BloggingContext> dbContextOptions) : base(dbContextOptions) { } public DbSet<Blog> Blogs { get; set; } public DbSet<Post> Posts { get; set; }}
If you inspect the code closely, you will notice that we inherited from DbContext, which allows us to manipulate the database. The DbContext will also enable us to use DbSets and CRUD methods. You can read more about DbContext Class on the Microsoft website.
Before using your Database Context with Code, you must set up migrations. Migrations allow you to evolve your database as you code and change the schema. I recommend you read up on Migrations managing schemas because it has excellent examples to help you start quickly.
At the high level, in Visual Studio, open up the Tools menu, then the NuGet Package Manager menu, followed by the Console. In the Console, you must install the following package.
Install-Package Microsoft.EntityFrameworkCore.Tools
The Microsoft.EntityFrameworkCore.Tools will allow you to make the following commands.
Add-Migration InitialCreate
Update-Database
Meanwhile, you might want to consider making a DesignTimeDbContextFactory because it aids in setting up the connection string for the database.
public class DesignTimeDbContextFactory : IDesignTimeDbContextFactory<BloggingContext>{ public BloggingContext CreateDbContext(string[] args) { // Build configuration IConfigurationRoot configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.Development.json") .Build(); // Get connection string var connectionString = configuration.GetConnectionString("DefaultConnection"); var optionsBuilder = new DbContextOptionsBuilder<BloggingContext>(); optionsBuilder.UseSqlServer(connectionString); return new BloggingContext(optionsBuilder.Options); }}
I’m considering publishing the fully working example on Git with the following components.
Current Donation Amount
$2.41 – PayPal fees
Note that the donation amount is being updated manually on my end. I have asked WordPress; see the image for details. I will list your name and last name initials. If you like the website backlink, donate $10 or more, and let me know in the comments your web address.
Donate to Goal of $666 to unlock Code First Generic Repository Pattern
Upon reaching the $666 Goal, I will share the code.
$3.00
Donators List
Got all my websites migrated and my domains transferred. What a great feeling. Another huge project gets checked off. Life is good!
"I’ve seen much of #AcademicTwitter coordinating a move to #Mastodon. Other communities might already simultaneously exist on Discord servers and subreddits, & can just let participation on #Twitter fade away as fewer people pay attention to it. But as our study implies, #migrations always have a cost, and even for smaller communities, some people will get lost along the way."
https://theconversation.com/mass-migration-from-twitter-is-likely-to-be-an-uphill-battle-just-ask-ex-tumblr-users-193677
@rene @Ambivalena Thank you all for your comments. It was also a great meeting and a long discussion with this Portuguese immigrant, whom we met on a street corner, who came to work in construction in the South-West of France, many years ago. He was proud of his hardworking life, of his children, saddened by the disappearance of his wife, testifying to a life full of humanity.
#Migrations are that too: personal stories that nourish the History of Nations.
Unraveling the Roman Empire’s Legacy: Balkan Genomes Illuminate Ancient Migrations
https://scitechdaily.com/unraveling-the-roman-empires-legacy-balkan-genomes-illuminate-ancient-migrations/ #RomanEmpire #Balkan #Genomes #Ancient #Migrations #Anthropology #Archaeology #Genetics #History
“#Migrations”: old character trapped in what resembles a T•••• flag :)
Forced mass #migrations have been a tragic and painful reality of human history. Conflicted historical events often give rise to contested interpretations and some atrocities that resulted in forced migrations are accorded more attention than others. The crimes of Hitler’s Third Reich prompted American historian Arno J. Mayer to ask “Why did the heavens not darken?” but experts say, the question cannot – and should not – be confined to that moment in time. #Gaza #thisweekthosebooks
https://www.rashmee.com/2023/11/05/gaza-forced-displacement-2/