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

add/fix table index setting #141

Merged

Conversation

Garthi
Copy link
Contributor

@Garthi Garthi commented Jul 8, 2024

Hi,

in the column you can set a indexType = IndexType.standardIndex but is had no effect right now, i have implement it for MySQL and MariaDB as a first suggestion, as a final or extra solution i think we need a separate way to add indexes with the Orm Annotation like

@Orm(
  tableName: 'user',
  generateMigrations: true,
  indexes: [
    @Index(name="search_idx", columns=["name", "email"])
  ]
)

i hope it is ok that we start with a MySQL/MariaDB solution :-)

@Garthi
Copy link
Contributor Author

Garthi commented Jul 8, 2024

forgotten to add a sample statement

CREATE TABLE user (
  id int PRIMARY KEY,
  group_id int,
  INDEX(`group_id`) 
);

@dukefirehawk dukefirehawk merged commit 6c71ee3 into dart-backend:master Jul 8, 2024
2 checks passed
@dukefirehawk
Copy link
Collaborator

Improvements to ORM for MySQL/MariaDb are always welcome.

@Garthi Garthi deleted the feature/fix_table_index_setting branch August 3, 2024 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants