sql export help

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
landrea
Posts: 27
Joined: 2018-08-04 13:09

sql export help

Post by landrea » 2019-03-26 16:09

I need to move all the data in a server (I'm in localhost)
there are options to select

looking the sql of the northwind example I think I need to leave everything by default and check only
"add istruction DROP TABLE /veiw / procedure / function ... etc.. "
and
"add IF NOT EXISTS"

or I have to leave everything by default options?

I tested also in my localhost, I took a risk to see what happen, I had fake datas,
and everything seem to work, but inside some table I had some strange field 1, field 2, field 3, with nothing inside

I deleted these fields

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: sql export help

Post by a.gneady » 2019-04-03 13:22

If the data on localhost is fake/test data, you don't need to dump it to SQL and move to the server. When AppGini setup script is run on the server, it will create the database there with no need for an SQL file.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

landrea
Posts: 27
Joined: 2018-08-04 13:09

Re: sql export help

Post by landrea » 2019-04-05 13:56

thanks for the asnwer,
I had two projects on local host, one with real datas and one with fakes,
I tested exportation with fakes datas,
I needed real datas because project is quite complicate

Now I moved sql exportation and everything went well,
I didn't get errors

I made these steps

1) move everything but the config.php file and set.md5
by the way I dont' get what set.md5 do, it's a strange file, its seem a sort of password

2) access the site online and create exactly the same admin of the local host

3) import sql inside the mysql project

4) copy and past the low part of the old config file for setup the admin configuration (except the access to the database are in the top fo the config.php

landrea
Posts: 27
Joined: 2018-08-04 13:09

Re: sql export help

Post by landrea » 2019-04-05 14:09

a.gneady wrote:
2019-04-03 13:22
If the data on localhost is fake/test data, you don't need to dump it to SQL and move to the server. When AppGini setup script is run on the server, it will create the database there with no need for an SQL file.
I need another help,
I make an error in two fields,
one is integer instead need to be varchar 40,
I tryed to check in advavnce, but I have pression to make things fast,
I wasn't ready to move the project in the server

so, I recreate the project in local host, theorically I need to move everything again from the local host to the server (where I have already all datas) overriding everything, I suppose when I move I need to skip config.php and set-md5 again because these are different in the local host to the server (I couldn't call database in the same way, because the server create a prefix and have a limitation of number of characters)

Now, since I need only to change the nature of two fields in the application I make a test changing everything directly in mysql,
I noticed in the admin I get a error, because it check the corrispondence with the project

I found two files where you can change the structure of database in the project
one is in admin folder and is call pageRebuildFields.php
you change this changhing the nature of filed in the table (from integer to varchar 40 null) and you dont' get anymore errors in admin console

the second is updateDB.php where you have same things but I think works only if you create from scratch the project, if you dont' have the config.php files, etc.. and need to create the database

so, for security reason I'm going to uplodad again the entire project overriding all the files and folder but the config.php file and set-.md5 I have in the server, but I think in the case and situation I describe is not really necessary and probably you need only to change something, the nature of the fields is some files of the project

May you help me understand how I could fix it without upload again 400/500 files?

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: sql export help

Post by a.gneady » 2019-04-11 13:19

I wouldn't recommend directly editing the generated files. This might cause unpredictable behavior. Editing in AppGini and regenerating is much easier and safer. To avoid re-uploading everything and upload only the changed files, you could use Git to mark modified files -- you need to do this before changing the project file in AppGini and regenerating. Please check this tutorial: https://bigprof.com/appgini/screencasts ... de-changes
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

Post Reply