4,381 questions
0
votes
0
answers
31
views
Error message when doing Update-Database in Blazor using VIsual Studio [duplicate]
when I run Update-Database command after creating a new migration, I get the following error:
Introducing FOREIGN KEY constraint 'FK_Booking_Employee_EmployeeId' on table 'Booking' may cause cycles or ...
Advice
0
votes
0
replies
55
views
How apply airflow db migration and save them into postgress docker image?
I use docker-compose to run airflow. Postgres section is
postgres:
image: postgres:12.16
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
healthcheck:
test: [ "...
1
vote
0
answers
41
views
WaveMaker 9.4 to 10.6.6 Migration: Type Mismatch Errors (Integer to BigInteger) in Generated Java Code
Problem Summary
I'm attempting to migrate a WaveMaker project from version 9.4 to 10.6.6 and encountering persistent compilation errors related to type mismatches between Integer and BigInteger in the ...
0
votes
1
answer
69
views
How to squash multiple DDL migrations into one script in Flyway Community Edition?
I’m using Flyway Community Edition and want to squash a long chain of DDL migrations into a single script to simplify migration history.
I’d like to remove the old DDL files, but we already have ...
1
vote
1
answer
65
views
Django migration successfully applied, but the database is not modified
I need to use a secondary SQLite database in a new Django project. This database is on the local filesystem but outside the Django folder. Its path is specified in a .env file at the root of the ...
2
votes
0
answers
62
views
Migrations & Seeders & Command for production data [duplicate]
Recently after some research I came up with a question: how to handle default / initial data population in a Laravel project which goes live: should it go into seeders or migrations? I've seen two ...
2
votes
1
answer
88
views
Managing read-only entities in EF Core
I have two DB contexts. Each manages its own read-write entities, but sometimes an entity r/w in one needs to reference in a r/o manner entities managed by the other context.
Originally, I had ToTable+...
0
votes
0
answers
74
views
Liquibase problem with MD5SUM function for Cassandra migration
I'm trying to automate Cassandra DB migration with using Liquibase in my Kotlin project. I'm using such stuff:
liquibase-core:4.30.0
liquibase-cassandra-4.30.0.jar
cassandra-jdbc-wrapper-4.13.1-...
2
votes
0
answers
88
views
Upgrade strapi v4 to v5 database
I have updated my strapi v4 to v5 in the local environment, and everything is goes well, so I pushed the code to the server to update my server strapi, but I notice it doesn't update my DB and ...
0
votes
0
answers
45
views
How to use custom query for data migration through SSMA Console
I’m using SSMA to migrate both schema and data to SQL Server.
I've prepared an XML file to feed into the SSMA console executable by command SSMAforDB2Console.exe -s "path/to/xmlfile", which ...
0
votes
1
answer
589
views
How to autogenerate and apply migrations with alembic when building a docker image?
I have an already existing docker image of my fastapi application. I have applied alembic migrations to it as well. However, every time I do a model change I have to run alembic revision -m "...
0
votes
0
answers
52
views
How to execute data transformation scripts (like password encryption) during Prisma migration?
I'm using Prisma with MySQL. My current database stores passwords in plain text, and I need to migrate them to bcrypt hashes.
When deploying this change via prisma migrate dev, I need to:
Update the ...
2
votes
1
answer
79
views
How to transfer fields to a database where one field is foreign?
I can't add fields to the profile, user_id seems to work, the values are correct, but it doesn't add to the field, but if I change it manually in mysql, it changes the value without errors, what ...
0
votes
0
answers
45
views
Move only one Sharepoint content database to a other SQL Server
I have a Sharepoint farm (2019) that contains only one SQL Server where all the databases are located - both configuration and content databases. I want to move a couple of content databases to a new ...
0
votes
1
answer
197
views
Alembic: "Can't locate revision" error after deleting migration file and recreating migration
I accidentally deleted the migration file before running alembic upgrade head.
Then I recreated the migration using the same command again. This time, Alembic generated a new revision UUID.
When I try ...
0
votes
0
answers
31
views
Deltek Vantage Point Standard API
Has anyone connected Deltek Vantage Point Standard API to Fabric? Deltek proposed we go with their DAYS offering (Snowflake). We are a Microsoft shop. What are the pro and cons if you have experienced ...
0
votes
2
answers
87
views
How to update removed model choices in Django without breaking existing database values?
I'm working on a Django project where we use models.TextChoices for fields like current_status. Our client requested wording updates — for example, renaming "Contacted" to "Contacted ...
1
vote
1
answer
72
views
How can I avoid overwriting the files table during a MySQL dump from development to production in a Strapi project using S3 for media storage?
How to avoid overwriting files metadata during MySQL import in Strapi with S3?
Context:
CMS: Strapi v4.25.12
Database: MySQL
Media: AWS S3 using @strapi/provider-upload-aws-s3
Deployment: Jenkins ...
1
vote
0
answers
26
views
Phinx targeted rollback gives No migrations to rollback
I created the following migration:
final class UpdateApiClientType extends AbstractMigration
{
public function up(): void
{
$this->execute("UPDATE Api_Clients SET Type = 'ibe' ...
1
vote
1
answer
155
views
EF Core migration conflicts between develop and feature branches (code-first approach)
We're using Entity Framework Core with the code-first approach, and our application has multiple active branches:
develop (main integration branch)
feature/x (feature-specific branch)
Both branches ...
0
votes
2
answers
88
views
TypeORM: No changes in database schema were found - cannot generate a migration
After having created all the database tables using synchronize: true, I am trying to add migration support to my nodejs typescript project. When I am running the command npx typeorm-ts-node-commonjs ...
0
votes
1
answer
134
views
Error copying local folder to SharePoint using PowerShell
I am working on a PnP.PowerShell script to copy a local folder to a specific SharePoint site (each client has a SharePoint site). The connection between our local server and SharePoint works, but some ...
0
votes
1
answer
31
views
Is it possible to create a foreign key to a custom primary key in Laravel
I have two Laravel migrations setting up two tables: brands and cars.
This is the content of the up function for the brands table migration (2025_05_04_002232_create_brands_table.php), it sets up a ...
1
vote
1
answer
96
views
First argument to $slice must be an array, but is of type: object
I have some MongoDB database records that have a nested Array, like this:
[
{
rootName: "AAA",
outerItem: {
innerItems: [
{
name: "A"
},
...
2
votes
1
answer
107
views
How to update a specific Array item by index, and copy the value of another field, in MongoDB?
I have many records in a MongoDB database, like this:
[
{
rootName: "AAA",
outerItem: {
innerItems: [
{
name: "A"
},
{
...
0
votes
1
answer
44
views
Error on database migration - Failed to add the foreign key constraint [duplicate]
I'm trying to migrate a MS-Access DB into MySql using MySQL Workbench. During the migration I get a "Failed to add the foreign key constraint. Missing index for constraint 'RegistrationsInvoices' ...
1
vote
1
answer
90
views
When loading data with seeder in Laravel, it says there is no conversion from nvarchar data type to datetime data type
public function up(): void
{
Schema::create('books', function (Blueprint $table) {
$table->id();
$table->string('book_name');
$table->string('...
0
votes
1
answer
56
views
How to add no overlaps period constraint using TypeORM decorator?
In my nest.js application I have to avoid of Benchmark table population in case ValidFrom and ValidUntil periods are overlapped. As for me the best idea is to use PostgreSQL DB functionality. So I ...
0
votes
2
answers
170
views
"Expected single row from SelectFromDatabaseChangeLogLockStatement but got 2" after importing production dump to dev
After importing a production database dump into our dev environment, our Spring Boot applications (two services sharing the same PostgreSQL database) fail to start with the error:
Copy
org....
0
votes
0
answers
10
views
Script-Migration is not working when migration name is specified
If I run Script-Migration, it correctly scripts the SQL script for all migrations.
However, if I specify the name of the migration, it will return an empty script. It seems not to find the migration.
...
0
votes
1
answer
96
views
Rails migration bulk updates for change_column_default
I created a migration that does two default value updates. It looks something like this:
class ChangeTableNameDefaultValues < ActiveRecord::Migration[7.2]
def change
change_column_default(:...
0
votes
0
answers
81
views
Efficiently Migrating 40TB of BLOB Data from Oracle to a Scalable System
I have a problem: I need to migrate 40TB of data from Oracle database (in .dmp format file) to my company database . The database contains only one table with two columns—one for the ID and the other ...
0
votes
1
answer
63
views
Is there a way in EF Core to generate SQL scripts when using separate migration assemblies
Following Microsoft's instructions on Using a Separate Migrations Project, I have build a solution model that looks something like the following:
\
+-- Application.csproj
+-- ...
0
votes
1
answer
76
views
Sync Sequelize model with database
I am trying to sync a Sequelize model with my database, but I can't get over this error.
Using Sequelize as my ORM, database is Oracle express:21.3.0-xe
This is the error:
Executing (default): ...
1
vote
1
answer
139
views
Heroku not running database migrations for Rails app
I have a Rails 8 app deployed to Heroku. The app was working with the Postgres database connected. I pushed code for an automatic deploy. The deploy said it worked, but I am getting a 500 on some ...
1
vote
1
answer
108
views
Running db migrations before integration tests
Suppose I have a web app consisting of an API and a db.
I also have a bunch of db migrations. Some of them update tables structure, while others also update the data. For instance, in migration_5 I do ...
-2
votes
1
answer
136
views
Best practice to seed/populate Core Data? [closed]
What is the right approach to seed Core Data database at the first launch?
I have sql db with precreated data.
I need to make this data available to the user at the app's first launch and then delete ...
1
vote
1
answer
109
views
pgcopydb change schema name when copying
In a pgcopydb copy table-data command, the source data is under "public" schema whereas in the destination db I have to put it under a different schema, say, "schema1". I'm not ...
0
votes
2
answers
75
views
Liquibase Double-Checked Locking Pattern ? (make liquibase not acquiring lock if everything is up-to-date)
If an application crashes (OOM / power failure / kill -9) after liquibase acquired a lock, but before releasing the lock, the lock will remain in the databasechangeloglock table forever and we'll need ...
0
votes
1
answer
136
views
Replace Liquibase with JSON Based Configuration for Database Migrations in Spring Boot
I'm working on a Spring Boot project where we are currently using Liquibase for database migrations to a PostgreSQL database. Our project involves creating tables, persisting data and performing ...
-2
votes
1
answer
53
views
When creating a self-hosted application, how are database migrations done? [closed]
The user will have an SQLite database on their file system. Now I update my application code to add another column, or a whole relationship, or relax a constraint. Do I create a migration script that ...
0
votes
0
answers
77
views
Django migrations failing in Docker container after adding new model
I am running a Django project inside a Docker container, and I am facing an issue with migrations after adding a new model to models.py.
When I try to apply the migrations, the system looks for the ...
0
votes
1
answer
58
views
Database-update command is failing due to the cascading issue (cyclic dependency) between two tables in C# and Entity Framework [duplicate]
I am working on a project, and I have two tables Users and Requests.
Scenario: a user can send multiple requests to the other users and other users can respond on that particular request.
I want that ...
0
votes
0
answers
57
views
EF Core migrations: updating database with previous migration existing in __EFMigrationsHistory table but not in .NET project
I'd like to update a shared dev database with my latest migrations. However, I see someone has applied new migrations from a different branch. Those migrations appear in the __EFMIgrationsHistory ...
1
vote
0
answers
218
views
Issue with Node-PG-Migrate and Incorrect Database Name
I'm using node-pg-migrate for my migrations, and I've set up my .env file with a custom database name, but when I run the migration command, it always tries to connect to a database with my PC's admin ...
0
votes
1
answer
116
views
How to rollback data to previous data in EF migration down script?
In my database table I have audit columns for create, update users and dates.
I want to update some rows using this migration script
update table set column_1=1, UpdatedBy='SystemUser', UpdatedDate=...
1
vote
1
answer
141
views
How to migrate a Room database when a column has to get added to an @Fts4 entity?
I am using Room (version 2.6.1) with a @Fts4 annotated @Entity to support full text search (which works perfectly well).
This is my entity and this is the version that Room automatically created to ...
0
votes
1
answer
115
views
Azure SQL Database Migration Failure: Issues with Tables Containing Encrypted Data
I am trying to migrate a local SQL database to an Azure SQL database using Azure Data Studio and the Azure SQL Migration instance. However, the migration fails for tables containing encrypted data (...
0
votes
0
answers
67
views
Cannot import .sql file created on a PC into PostgreSQL on my Mac. Converted to LF on VSC but I keep getting syntax error on the COPY query line
Never really worked with PostgreSQL before and I but cannot find anything online and chatGPT is now going in circles. Other team members work on PSc, I work on Mac. Set up psql, set up the db, ...
3
votes
1
answer
303
views
How to use diesel embed_migrations? Getting "expected one of `!` or `::`"
I have a file structure as follows:
├── Cargo.lock
├── Cargo.toml
├── diesel.toml
├── migrations
│ └── 2024-11-14-193305_create_entities
│ ├── down.sql
│ └── up.sql
└── src
└── main....