-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Queries endpoint. #981
Queries endpoint. #981
Conversation
@@ -35,6 +35,7 @@ def upgrade(): | |||
sa.Column('rows', sa.Integer(), nullable=True), | |||
sa.Column('error_message', sa.Text(), nullable=True), | |||
sa.Column('start_time', sa.DateTime(), nullable=True), | |||
sa.Column('changed_on', sa.DateTime(), nullable=True), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need an index on this
762fbf5
to
7e6944b
Compare
sa.Column('end_time', sa.DateTime(), nullable=True), | ||
sa.ForeignKeyConstraint(['database_id'], [u'dbs.id'], ), | ||
sa.ForeignKeyConstraint(['user_id'], [u'ab_user.id'], ), | ||
sa.PrimaryKeyConstraint('id') | ||
) | ||
op.add_column('dbs', sa.Column('select_as_create_table_as', sa.Boolean(), | ||
nullable=True)) | ||
op.create_index(op.f('ix_query_changed_on'), 'query', ['changed_on'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a composite index here, not 2 indexes. Here's an example:
https://github.com/apache/incubator-airflow/blob/master/airflow/models.py#L708
7e6944b
to
e8a1a9a
Compare
@mistercrunch