Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create database #376

Open
f0rever-johnson opened this issue Apr 22, 2018 · 10 comments
Open

Create database #376

f0rever-johnson opened this issue Apr 22, 2018 · 10 comments
Assignees

Comments

@f0rever-johnson
Copy link

Thank you for your hard work!! I just have a request. Is it possible to create a database from this script? Like POST /"DATABASE NAME" ? & then create a table on that database? essentially an endpoint to dynamically creating databases & tables.

@mevdschee mevdschee self-assigned this Apr 24, 2018
@mevdschee
Copy link
Owner

Is it possible to create a database from this script?

No, but it is not a bad idea. I'll register it as a feature request.

This might be added (at some point) to v2 as that version has more advanced meta data support.

@f0rever-johnson
Copy link
Author

f0rever-johnson commented Apr 24, 2018 via email

@mevdschee
Copy link
Owner

mevdschee commented May 20, 2018

Do you think that is a viable solution?

Sure it is.. 👍

@mevdschee mevdschee added v2 and removed v2 labels May 21, 2018
@mevdschee
Copy link
Owner

mevdschee commented Jun 11, 2018

@f0rever-johnson I'm aiming for such support in v2. I have reflection, table renames and column changes implemented currently.

@mevdschee mevdschee added the v2 label Mar 24, 2019
@mevdschee mevdschee removed the v2 label Apr 8, 2019
@f0rever-johnson
Copy link
Author

Hey, any update to dynamically creating databases/tables?

@mevdschee
Copy link
Owner

Hi Everaldlee, Thank you for asking this question. Creating tables is now possible, creating databases is not (yet) supported. I hope this helps you. Kind regards, Maurits

@f0rever-johnson
Copy link
Author

I am not seeing anything regarding creating tables. Is there an example or a specify endpoint I should be using?

@mevdschee
Copy link
Owner

You need to enable the 'columns' controller, see also: https://github.com/mevdschee/php-crud-admin/blob/main/src/index.php

@f0rever-johnson
Copy link
Author

I enabled the columns controller. However I am unsure on how to access the endpoint to create a table. Essentially I have a sample table(s) I would like to duplicate whenever a new user is created in my identityprovider.

@mevdschee
Copy link
Owner

I have a sample table I would like to duplicate

This is not yet supported, although one could write this as middleware, executing certain queries when a new authenticated user is encountered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants