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

Add redis wipe and --force-reset to DATABASE_SETUP=1 #423

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

humphd
Copy link
Contributor

@humphd humphd commented Mar 23, 2023

In the meeting today we discussed the need to use --force-reset when calling prisma db push on staging, and also to flush all keys in Redis. This change does that.

I've also added notes about how this works.

We'll need a different plan later when we can't afford to lose data.

@humphd humphd added this to the Milestone 0.7 milestone Mar 23, 2023
@humphd humphd requested review from cychu42 and a user March 23, 2023 01:13
@humphd humphd self-assigned this Mar 23, 2023
@humphd humphd merged commit a22e94f into DevelopingSpace:main Mar 23, 2023
@humphd
Copy link
Contributor Author

humphd commented Mar 23, 2023

I just ran this on staging, and it worked:

starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | Running database reset and setup...
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | npm WARN exec The following package was not found and will be installed: [email protected]
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | Prisma schema loaded from prisma/schema.prisma
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | Datasource "db": MySQL database "customdomain_dev_db" at "db-mysqldv-vip.dcm.senecacollege.ca:3306"
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    |
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | The MySQL database "customdomain_dev_db" at "db-mysqldv-vip.dcm.senecacollege.ca:3306" was successfully reset.
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    |
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | 🚀  Your database is now in sync with your Prisma schema. Done in 275ms
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    |
✔ Generated Prisma Client (4.11.0 | library) to ./node_modules/@prisma/client in
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    |  219ms
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    |
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | Database setup complete
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | Running redis cleanup for redis://redis:6379...
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | npm WARN exec The following package was not found and will be installed: [email protected]
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | OK
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | Redis cleanup complete
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | {"level":"info","message":"🔌 setting up prisma client to db-mysqldv-vip.dcm.senecacollege.ca:3306","timestamp":"2023-03-23T19:26:21.782Z"}
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | {"level":"info","message":"✅ app ready: http://localhost:8080","timestamp":"2023-03-23T19:26:24.213Z"}
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | {"level":"info","message":"process DNS record expiration","timestamp":"2023-03-23T19:26:24.414Z"}
starchart_mycustomdomain.1.9ose1zc1k8aq@cudm-mgmt01dv.dcm.senecacollege.ca    | {"level":"info","message":"TODO: process certificate expiration","timestamp":"2023-03-23T19:26:24.454Z"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants