Does table data get transferred when cloning the app? Specifically the Users table with passwords but also any other data I have entered in my App through Anvil.works?
I cannot get password reset emails to send. Is there an SMTP log anywhere to check for errors?
config settings used:
The term ‘clone’ is used in two different contexts within Anvil. When you clone an app within Anvil itself (using the clone link), everything is copied, including the tables.
However, for the app server, you are using git to clone the source code (only) for your app and that’s a completely different mechanism.
When you (git) clone your app, it will include a file named anvil.yaml which contains, amongst other things, the schema definition of any data tables. This flag means that the server will read that definition and create those tables in your local copy. Note - the tables will have no content.
But I believe I have might have found some answers by looking into code I don’t entirely understand. And on that basis please excuse me if I’m talking complete rubbish!
smtp-encryption: option will accept the following values “ssl” or “starttls”.
From email.clj line 227:
(defn smtp-send [{:keys [host port user pass encryption] :as _smtp-config}
{:keys [from-address from-name to cc bcc subject text html attachments inline-
attachments in-reply-to references app-id] :as _message}]
(when-not host
(throw+ {:anvil/server-error “No SMTP server has been configured for this app”}))
It appears that the smtp email “from account” might be hard coded to “accounts” which would make the “Invalid Addresses” error make sense as it is not a valid user on my email host.
No, but it get’s me to the next problem (see AnvilWrappedError: Invalid Addresses) which might be due to hard coding of the “from-address” as “accounts”.
Move? Not that I know of. Copy, yes, in principle. I wrote a backup routine that writes to a SQLite database. (Search this forum for SQLite.) It preserves row-ids.
When adding a row to a new table, of course, brand-new row-ids will be created, guaranteed to be different from the original. So, if there are any references to such a row, via row-id, you’d need to translate those references (row ids) from the old scheme to the new.
Of course, once it’s copied, you could delete the original data, so I suppose that would count as a “move”.
Thanks… the issue is that I have a working app on the Anvil servers, but I’m trying out the Anvil App Server installed on Google Compute, both to learn something and to have a backup. I got it up and running, but it generated an error when it tried to read a table with no entries. That’s when I realized that git cloning didn’t copy the tables…