All available database field types

How to know the all available data types for database field ?

Also is there any way we can get autocomplete the things in Adonis for controller functions or models ?

Thanks for the great framework ! Will be going to make a next big app with vue js.

Hey @jigarmistry! :wave:

How to know the all available data types for database field ?

Do you mean to have autocomplete for model’s field or know type of fields while doing migration?

Also is there any way we can get autocomplete the things in Adonis for controller functions or models ?

For the moment we are limited by text editor / IDE. Adonis got the goal to have IntelliSense available in a future, but it’s not a critical feature for the moment.

Yup, once done with the main features, docs and other learning material. I will be looking into creating a language server for Adonis, which will work for Atom, VsCode or maybe Sublime too ( if they implement language server protocol )

1 Like

I mean to get the list of available fields to use while I am preparing the database tables in model schema file.

We really need this feature as its something need now days :slight_smile: Let us know if you need any help in this. May be start the repo and other people like me can contribute on that.

@jigarmistry Yes we do need help. I am afraid that I have very less time to do the research for writing a language server or even start a repo.

The best I can do is if someone starts the project with some barebones, I can contribute to it

@virk Make a perfect sense. But I do not know how to write that type of things but let me do a research on the same and will see if I can be able to start the extension for vscode.

Thanks again for great framework.

Can you please let me know how can I see the APIs for schema and models ? So I can see the things while writing the codes like inbuilt functions and types ?

@virk @romain.lanz can you please let me know the all fields(like below we have the string) available while writing the models ?

table.string('username', 80).notNullable().unique()

like here I have notNullable() and unique() methods. Which are others ? any references ?

@jigarmistry
http://knexjs.org/#Schema

for those who arrive in this post and search for this topic, the page now exists

https://adonisjs.com/docs/4.1/migrations#_creating_migrations