Migrate database without alembic_version table in python flask - database

I like to migrate my database but I don't want alembic_version table in my database. It is possible without this alembic_version table. Is there any other solution or it is possible or not.

Related

laravel change table in PHPMYADMIN without migration

I have several tables that I have created through migration. Then, what happens if I change the table structure directly from PHPMYADMIN without using migration? What if my backend team pulls my project, then runs the "php artisan migrate" command. Is the database on my backend team the same as the database that I have?
If you make changes through phpMyAdmin, these will only be visible to you. You should change the migrations, or if you can't change the original because you don't want to reset the database, you should create a new migration to alter the table. Check the documentation for altering tables here: https://laravel.com/docs/5.7/migrations#modifying-columns

Azure sql cross database trigger

. I have two databases in same azure sql server .i want that both database interact to each other using trigger. i.e If any record is inserted in Customer table of first database the trigger gets fired and record is inserted in another database.
We had / have the same problem with triggers that we use for insert-update-delete where we write a record to Database-1 that has the primary table, but also updates Database-2 where we hold "archive" versions of the tables.
The only solution we have identified and are testing is to bring all of the tables into a single database and separate the different tables under separate database schemas in the one database.
Analysis so far of this approach looks promising.
I think what you're trying to do is not allowed in Sql Azure. From my expertise what you are trying to do is a bad practice on-premise as well (think backups-restore and availability issue scenarios).
You should move the dependency in the application and have the application update both databases, as appropriate.
Anyway, if you want to continue with this approach please take a look over Elastic Query feature: https://learn.microsoft.com/en-in/azure/sql-database/sql-database-elastic-query-overview
Please let me know if I can help with something

ODB PL/SQL API for a created View?

For a given Oracle Database (ODB) 12c table you have the chance to create a CRUD-style API using JDeveloper or SQL Developer by right clicking on it.
Before considering creating a query for several tables that are related to each other with a primary key, I want to know if it is possible to create an API if I create a view for these tables? Particularly the Insert?
The database normalization is very strict from the side of our customer.
The answer is NO, You cannot have a table API from a view with Jdeveloper or SQL Developer by right click on i

Prevent docrine from updating schema on one database

I have a Symfony project using a MYSQL database. I setup a second entity manager which accesses a SQL Server database. I'd like the ability for Doctrine to read and write to both databases, which it can do now. But I'd like to prevent Doctrine from updating the database schema, if I were to make a change like that by myself.
Doctrine should not be able to add tables, remove columns, or change the name of columns in the SQL Server database. Doing so would break the legacy application that uses this database.
Is there some setting I can use to make sure the database schema won't change?

How to migrate from CodeIgniter database to Laravel database

I have decided to migrate from my CodeIgniter app to laravel specially for their rails-likely handling of the database.
The problem though is that i have 800mb of database to migrate. How can I do this in a good and fast way? The tutorials i have seen is based on old laravel models to new ones. Which makes me confused.
I also use codeigniter's crypt library for the user passwords. How can I migrate this?
Databases are pretty much the same in Laravel or Codeigniter, if your tables are good the way they are for you and they have a primary key named id (this also is not mandatory) you can just connect with Laravel in your database and it will work just fine.
For your new tables, you can create new migrations and Laravel will not complaint about this.
Well, but if you really need to migrate to a whole new database, you can do the following:
1) rename the tables you need to migrate
php artisan migrate:make
2) create all your migrations with your and migrate them:
php artisan migrate
3) use your database server sql utility to copy data from one table to another, it will be way faster than creating everything in Laravel, believe me. Most databases will let you do things like:
INSERT INTO users (FirstName, LastName)
SELECT FirstName, LastName
FROM users_old
And in some you'll be able to do the same using two different databases and columns names
INSERT INTO NEWdatabasename.users (firstName+' '+Lastname, email)
SELECT name, email
FROM OLDdatabasename.
Or you can just export data to a CSV file and then create a method in your Laravel seeding class to load that data into your database, with a lot of data to import, you just have to remember to execute:
DB::disableQueryLog();
So your PHP doesn't run out of memory.
See? There are a lot of options, probably many more, so pick one and if you need help, shoot more questions.

Categories

Resources