Slide 1

Slide 1 text

From the Wild into the Cloud

Slide 2

Slide 2 text

Moving an existing project to the Laravel Cloud

Slide 3

Slide 3 text

$ whoami @neverything silvanhagen.com/links

Slide 4

Slide 4 text

Why?

Slide 5

Slide 5 text

Ready for Moving Day?

Slide 6

Slide 6 text

Moving day Set aside enough of your favorite caffeinated drink – Called my mom to tell her that I'm not available for tech support – Kiss my wife goodbye for 2 days –

Slide 7

Slide 7 text

Moving day, for real From MySQL to Postgres 1. From disk to Object Storage 2. From local to third-party services 3.

Slide 8

Slide 8 text

1. From MySQL to Postgres

Slide 9

Slide 9 text

1. From MySQL to Postgres Check your custom queries – Make sure your packages are compatible – Move your database content –

Slide 10

Slide 10 text

Custom Queries $query = auth()->user()->is_admin ? Project::query()->orderByRaw(DB::getDriverName() === 'mysql' ? 'FIELD(status, "in review", "published", "archived")' : "CASE WHEN status = 'in review' THEN 1 WHEN status = 'published' THEN 2 WHEN status = 'archived' THEN 3 ELSE 4 END" ) : auth()->user()->projects(); return $query; From MySQL to Postgres 1.

Slide 11

Slide 11 text

Make sure your packages are compatible From MySQL to Postgres 1.

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

2. From disk to Object Storage

Slide 14

Slide 14 text

3. From puppeteer to screeenly Thank you Stefan Zweifel

Slide 15

Slide 15 text

4. Add your domain

Slide 16

Slide 16 text

5. Profit! Right? RIGHT?

Slide 17

Slide 17 text

There was silence

Slide 18

Slide 18 text

Too much silence

Slide 19

Slide 19 text

Here is what I missed

Slide 20

Slide 20 text

Here is what I missed Postgres currval

Slide 21

Slide 21 text

Here is what I missed Postgres currval -- Get last value SELECT last_value FROM _id_seq; -- Get sequence information SELECT * FROM _id_seq; -- Get next value without incrementing SELECT nextval('_id_seq'); -- Get current max ID from the table SELECT MAX(id) FROM ; -- To fix this SELECT setval('_id_seq', (SELECT MAX(id) FROM ))

Slide 22

Slide 22 text

Here is what I missed If you like like like I do...

Slide 23

Slide 23 text

Here is what I missed If you like like like I do... $query->whereLike('name', '%Caleb%') // OR $query->whereRaw('LOWER(name) LIKE ?', [strtolower('%Caleb%')]) // OR $query->whereRaw('name ILIKE ?', '%Caleb%')

Slide 24

Slide 24 text

If you go with Postgres Do yourself a favor

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Demo time

Slide 27

Slide 27 text

Should I move to Laravel Cloud

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

we must just ship

Slide 30

Slide 30 text

#wejustship

Slide 31

Slide 31 text

#wejustship silvanhagen.com/talks/meetup-laravel-cloud