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

Track create-table and drop-table events with Datasette 1.0a8 #53

Merged
merged 4 commits into from
Feb 9, 2024

Conversation

simonw
Copy link
Owner

@simonw simonw commented Feb 8, 2024

Refs:

TODO:

  • Run tests on both Datasette versions
  • Track create table
  • Track drop table
  • Tests for all the above that only run on Datasette 1.0a8

@simonw simonw added the enhancement New feature or request label Feb 8, 2024
@simonw
Copy link
Owner Author

simonw commented Feb 9, 2024

I'm going to fire the alter-table event only if the table schema has changed. I won't fire it for create index / drop index.

@simonw
Copy link
Owner Author

simonw commented Feb 9, 2024

Should I fire that event for rename table?

Probably yes. The catch is that I need to decide which table I'm going to use as the table attribute - should that be the previous name or the new name?

The before_schema and after_schema things will capture those details.

I'm going to track the new table name as the table in the rename, since that makes it easier to start with that table and figure out its history.

@simonw
Copy link
Owner Author

simonw commented Feb 9, 2024

Problem! AlterTableEvent isn't in a release yet - I implemented that after I shipped 1.0a8.

@simonw
Copy link
Owner Author

simonw commented Feb 9, 2024

I'll do alter event in a separate issue.

@simonw simonw changed the title Track events on Datasette 1.0a8 Track create-table and drop-table events with Datasette 1.0a8 Feb 9, 2024
@simonw simonw merged commit c59ca4b into main Feb 9, 2024
20 checks passed
@simonw simonw deleted the track-events branch February 9, 2024 00:31
simonw added a commit that referenced this pull request Feb 18, 2024
Refs #53 (comment)

We are not supporting pre-Datasette 1.0a9 any more

Closes #54
simonw added a commit that referenced this pull request Feb 18, 2024
Switch setup.py to pyproject.toml

Refs #22, #45, #46, #47, #49, #50, #51, #52, #53, #54, #55, #56, #57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant