{"id":19294578,"url":"https://github.com/web3-storage/web3-schema","last_synced_at":"2025-04-22T08:30:34.256Z","repository":{"id":47258865,"uuid":"400134036","full_name":"web3-storage/web3-schema","owner":"web3-storage","description":null,"archived":true,"fork":false,"pushed_at":"2021-09-06T10:51:55.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T00:28:04.075Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/web3-storage.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-26T10:47:52.000Z","updated_at":"2024-04-18T16:40:38.000Z","dependencies_parsed_at":"2022-09-14T08:41:34.565Z","dependency_job_id":null,"html_url":"https://github.com/web3-storage/web3-schema","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fweb3-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fweb3-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fweb3-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3-storage%2Fweb3-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web3-storage","download_url":"https://codeload.github.com/web3-storage/web3-schema/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250205976,"owners_count":21392158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T22:38:46.233Z","updated_at":"2025-04-22T08:30:34.007Z","avatar_url":"https://github.com/web3-storage.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# web3.storage sql schema experiments\n\nExperiments converting web3.storage [fauna database schema](https://github.com/web3-storage/web3.storage/blob/main/packages/db/fauna/schema.graphql) into postgresql.\n\nSchema design is based on [this](https://bafybeieevwz3ubli22dra5dnjp5w2gvuc54y6bpf67p3xikeracokttp2m.ipfs.dweb.link/web3.storage-schema.jpg) image, not exactly matching the current fauna schema.\n\n[![faunadb schema](https://bafybeieevwz3ubli22dra5dnjp5w2gvuc54y6bpf67p3xikeracokttp2m.ipfs.dweb.link/web3.storage-schema.jpg)](https://bafybeieevwz3ubli22dra5dnjp5w2gvuc54y6bpf67p3xikeracokttp2m.ipfs.dweb.link/web3.storage-schema.jpg)\n\nTo set up a database locally, first create a new database:\n\n```shell\ncreatedb web3_storage\n```\n\nThen apply the schema to it:\n\n```shell\npsql -d web3_storage \u003c schema.sql\n```\n\n\u003chr\u003e\n\n### Heroku and PostgREST\n\nThis repo also contains the config to deploy PostgREST to heroku on top of the new schema.\n\nTo deploy to your existing heroku app with postgresql addon via the cli:\n\n```shell\nheroku pg:psql DATABASE \u003c schema.sql\n```\n\nTo set up a new heroku app run, hit the button below:\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\nThis will create a new heroku project with postgresql addon and PostgREST configured.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3-storage%2Fweb3-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3-storage%2Fweb3-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3-storage%2Fweb3-schema/lists"}