Joomla Akeeba Backup exclude database table column - joomla

I am using a combination of Joomla 3.x/Hikashop/Akeeba Backup for staging between my dev and production sites. I understand that from Akeeba, I can configure database tables to exclude, however I need to exclude a very specific column from a table when migrating from my dev to production. so for example #_hikashop_product contains the column of product_quantity that needs to retain its value on the production side since the dev does not have values. If I exclude the entire product table, I would be excluding updates to products my clients have made.
any suggestions?

The best way to do this would be to create a PHP script that will run after Akeeba to copy the contents of the product table. The product table should be excluded from the Akeeba backup.

Related

Production Database Creation / Migration dilemma for ASP.NET Core MVC

I have been building my ASP.NET Core MVC web application since last year and there are currently 100 migration files in my project, as the database has evolved along with features and capabilities. My development / test database is obviously in sync with this migration.
Now, the time has come to create a Production environment, and I want to have an empty database with only the table schema. So, I just can't copy my test database to create a production database.
So, the question / dilemma I have regarding creating this Production database is as follows;
1. I can either create my Production database by running Add-Migration command (for which I need to delete existing migration files from the project), or
2. Create table schema in SQL Management Server, and keeping the __EFMigrationsHistory from test database
With [1], I am not sure how I will be able to manage my test database with this same project, going forward.
With [2], I am not sure if there is any drawback.
So, what is the standard or best practice for Production deployment?
You can certainly use Visual Studio to create or update database tables, but this would normally just be in your development environment.
If you are worried about the number of migrations you have, you still have the option of starting over by deleting them, and deleting your migration history (and manually deleting your tables and data) and creating a fresh 'Initial create' migration. If you do this you will probably want to export any test or config data first, or make sure you have a way to recreate it.
For the staging and production deployments, best to use SQL Server Management Studio to generate a script to build your tables. The database administrator - or you if it's just you - can create the database and run the script to generate the tables.
This is because staging and production environments tend to be more tightly controlled than development, so best to understand the processes that are most appropriate for the environment.
You need to check that your dev and staging/production SQL databases are set at a matching 'compatibility level', and also need to decide whether you need to add any seed or configuration data on create.
In SQL Server Management Studio, select the appropriate option to generate a script for the required tables.
https://learn.microsoft.com/en-us/sql/ssms/scripting/generate-scripts-sql-server-management-studio?view=sql-server-ver15
You can also use this process to export, and import data - this is ideal for config or test data.
https://dzone.com/articles/generate-database-scripts-with-data-in-sql-server

Heroku share database in pipeline with restricted permissions?

I have a production and staging app in my pipeline. I would like to do one of two things.
Copy the postgres production database, but with limited data (as the current amount requires that I pay). Really, I want to copy all of the data except from one table. Is it possible to copy it and then just delete a table?
If this is not possible, can I share the production database with the staging app but not allow it to add or delete data unless I know it is ready.

How do I add >100 new rows to a SQLite DB in the documents directory without overwriting?

I have a SQLite table that I'm using for my iPad app. It currently has about 500 items, but I need to add about 200+ more. The thing is, the app is already deployed and has users, and it's an editable database in the documents directory, so it's not like I can just overwrite it. How can I add these new rows easily without destroying the table that I already have? It would be nice to import a txt somehow without having to do this manually. (For the record I am not using Core Data.)
Throwing out some ideas:
Can you not deploy a new database file in your update, and programatically detect if there is an existing db. If so, add the new data to the database and if not create a new db programatically, and add all your data to it.
You could store the setup data in an xml file perhaps?
ALTERNATELY, could your update have a second database? You don't overwrite your original db and you add a v1.1 db file? You could then merge the v1.1 data into the original db?

Not to drop database or tables with EF4.1?

Is there a way to make Entity Framework 4.1 Code First NOT to drop database or the tables, not even if its changed? Im suppose to upgrade a LIVE site and I cant because of this. I seen some NuGet classes I can get but its to not drop database but tables, recreate tables on change ect.. i just do not want to do anything to the database or the tables.
In the startup of your application add this:
Database.SetInitializer<YourContextType>(null);
This should remove any initialization strategy.

MySQL - Specific Table Replication

Is there a script or a way for me to sync only certain tables from the master DB to all slave site DB's. They are all on the same server, but there are around 200 mysql db's and all of them must be kept in sync with main DB and replicate every hour or so... or alternatively is there a Joomla Component that can do the above with the Virtuemart Tables
If i'm understanding your question, you should check out the multisite component:
http://www.jms2win.com/

Resources