Hi everyone. I'm experimenting with an multi-tenant app. My goal is to use 
a sqlite file per tenant (the tenant data). I have a main sqlite file where 
I have defined the auth tables and a Client (tenant) table.

The structure I'm looking for is something like this, where inside a 
tenant folder there should be the migrations files and the sqlite db (in 
this example I only got working the sqlite db creation, not the migrations 
files):

<https://lh3.googleusercontent.com/-I5S5e1vK5M4/WeAuHCOYSoI/AAAAAAAAI_o/Vum1Tm3V8LYLPjlg_OCXoDbF2wRDBtm8wCLcBGAs/s1600/Selecci%25C3%25B3n_001.png>


So, I have two DB models, one for the main database and the second for the 
tentant DB. The tenant model loads a variable wich contains the identifier 
of the requested tenant, so It should create the sqlite file and generate 
the migrations files.


My problem is that I want specific migrations files per database, not the 
same .table files for every sqlite db. So, I'm trying (whitout success) to 
generate the migration files inside the tenants folders. The sqlite db is 
created without problems, but the following example does not:


In the tenant model:



<https://lh3.googleusercontent.com/-63SP5v_Vq5s/WeAwx6WPPvI/AAAAAAAAI_0/SZbqrRnI56UhdcKbb-A97b6YF3L51pBpwCLcBGAs/s1600/Selecci%25C3%25B3n_002.png>


So, whatever path I put in the folder argument of the DAL's constructor, I 
get a time out exception. I don't know why. I've tried relative paths, 
joining the os.path with the request.folder, nothing works. Also the error 
I'm getting is a time-out exception, so I don't know what is the conflict, 
because according to the book, the folder parameter is "where .table files 
will be created". If "folder" is empty or not defined, it works, but as I'm 
saying, I would like specific migrations files per tenant database. 

It this possible? What's wrong?

Thanks in advance.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to