Adding filedocuments to an application in production

0
Hi all, I am doing a data conversion where data needs to be added to an existing application. There are documents too, that will need to be put into filedocuments for use in the application. I am wondering how I need to do this for it to work without any complications, because there already is about 20Gb of documents in production. Will new file documents be added correctly without the 20Gb of files present locally? The way I would do this preferably is download the database (without any filedocuments) and run the conversion on this database locally, then just copy the filedocuments that were generated to the cloud. Will this work without complications? Or do I need to download all the existing filedocuments from production, have them locally and then add the new filedocuments? Thanks!
asked
5 answers
1

Filedocuments will need to be converted too between version 3 and 4 of Mendix, this has to do with upgrading our object identifiers to 64 bits. I'm afraid that in this case you will need to have your files present when migrating.

Edit: updated after reply

No you cannot simply put the files in the deployment files folders, FileDocuments in Mendix have additional properties and are named and sorted in folders according to their object identifier.

answered
1

@ Pieter: I don´t fully understand this. Could you explain a bit more? My reckoning is this: If the file names are based on the identifiers inside the database, shouldn´t new files be added with non-conflicting names and in the proper folder solely based on the database information? Regardless of physical files and folders already present? Thus making files created locally with the database downloaded from the cloud usable with those in the cloud by copying the local files folder and merging it with the files folder in the cloud?

answered
0

Hi Bas,

I'm not sure I explained correctly, but we're not doing a conversion from 3.2.2 to 4.x.x. Maybe there is a misunderstanding about the term 'conversion'. What I mean with conversion here is that we are going to migrate existing data from an 'old' non-Mendix application into our Mendix application. Does that change your answer?

answered
0

@Sanjay I am not sure i understand you either ;] But a physical file document has a filename equal to the identifier of the file document in the database. Thus if you import all the records of an existing database in a local database without changing the physical file names you could end up with a lot of file documents that have a different identifier then file name.

If you add a new file afterwards things will just go fine. But how do you ensure that the existing identifiers point to the already existing files?

answered
0

Thus if you import all the records of an existing database in a local database without changing the physical file names you could end up with a lot of file documents that have a different identifier then file name.

I think there is the misunderstanding, no filedocuments will be imported, only new files will be added. Maybe my first post was a bit fuzzy so let's forget my first post and I'll try to simplify :)

What I want to do boils down to this:

  1. download a database from the cloud without files
  2. restore that database locally (so there are no files locally)
  3. run the same app as in the cloud with the restored database and add files locally
  4. restore database in the cloud
  5. copy local files from deployment\data\files to the cloud

The locally created files should have correct names since it's based on the same database as in the cloud.

This should work right?

answered