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 table ExtractMetadata to store extract files #2791

Open
2 tasks
mikehgrantsgov opened this issue Nov 8, 2024 · 0 comments
Open
2 tasks

Create database table ExtractMetadata to store extract files #2791

mikehgrantsgov opened this issue Nov 8, 2024 · 0 comments
Labels
database topic: backend Backend development tickets

Comments

@mikehgrantsgov
Copy link
Collaborator

Related to 2454

Summary

The legacy website provides the ability to download XML extracts of opportunity data: https://www.grants.gov/xml-extract - this is something we should also support. Having extracts (especially if they're just the same data as our search endpoints) reduces the traffic our search endpoint will need to handle as we can point anyone that would want to scrape our data to an extract file.

Create a table to track extract metadata.

Something like:

class ExtractMetadata(Base):
    __tablename__ = 'extract_metadata'

    id = Column(Integer, primary_key=True, autoincrement=True)
    extract_type = Column(String, nullable=False)
    file_name = Column(String, nullable=False)
    file_path = Column(String, nullable=False)
    file_size = Column(Integer, nullable=False)
    created_on = Column(DateTime, server_default=func.now(), nullable=False)
    updated_on = Column(DateTime, server_default=func.now(), onupdate=func.now(), nullable=False)

Acceptance criteria

  • Model created
  • Database migration generated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database topic: backend Backend development tickets
Projects
Development

No branches or pull requests

1 participant