20241002180623_drop_unused_collections.mjs 505 B

12345678910111213141516171819202122232425262728293031
  1. import Helpers from './lib/helpers.mjs'
  2. const tags = ['saas']
  3. const unusedCollections = [
  4. 'githubBuilds',
  5. 'githubRepos',
  6. 'userstubs',
  7. 'templates',
  8. 'quotes',
  9. 'folders',
  10. 'files',
  11. 'objectlabs-system',
  12. 'objectlabs-system.admin.collections',
  13. ]
  14. const migrate = async client => {
  15. for (const name of unusedCollections) {
  16. await Helpers.dropCollection(name)
  17. }
  18. }
  19. const rollback = async client => {
  20. // can't really do anything here
  21. }
  22. export default {
  23. tags,
  24. migrate,
  25. rollback,
  26. }