>> The "walls" on the bed will be rock.
If the walls are not mortared together or lined with heavy plastic film, water will drain quickly out of the RAISED part of your bed, just through cracks in the wall, or cracks where the wall meets the soil surface outside the bed.
With a raised bed, the only drainage problem will be the part of the bed BELOW grade (lower than the surrounding soil surface. If the natural soil at and below grade is
heavy clay, you might have drainage trouble if you want the root zone to extend
below grade.
Say you have walls only 8-12 inches tall, like most of mine, and below that is heavy clay. I started out digging down below grade and amending that subsoil heavily
inside my bed so the root zone COULD go lower.
But of course any rain flows from the surface down to points below grade. And stays there for days, until it can very slowly "perk" down through the heavy clay.
That's "making a mudbath" or "filling the bathub with mud". (See photo below.) Any root that goes below grade in such a mudbath simply drowns, dies, and rots. It makes plants very unhappy to drive roots down and down until the next rain, when they die back to the level of the water, and then rot. Then they do the same thing again and again, making more roots that just die in each rainstorm. Until the plant dies, too.
IF your walls are lined with heavy plastic,
or you want your "raised" bed to also have a below-grade root zone,
and you have very heavy clay soil,
...
then you might need to create better drainage.
Digging trench big enough to bury perforated, corrugated drainage pipe is a heavy-duty way to do that. The only such pipe I know is 6" in diameter (maybe there was a 4" version?) That requires a wide, deep ditch that you will have to back-fill with pipe and gravel.
If you just want to get a somewhat deeper root zone (say 6-12 inches below grade),
and you have a natural slope to work with, it can be easier.
Use a pick or mattock to break up the soil UNDER the bed to the depth you want to make into a DRAINING root zone. Shovel it aside so you can see the hard clay "floor" of your future root zone.
Hack and rake that "floor" to slope uniformly to the lowest point in the local slope of your land.
Now dig a slit trench form the lowest edge or corner of the "floor" towards the lowest nearby point in your yard, where you want rainwater to drain TO.
(Back-fill the sunken and raised parts of the bed with well-draining, airy, amended soil and compost before or after you finish the trench - just make sure you finish the trench before the next rainfall.)
The floor of the trench must start at or below the lowest point of your "root zone" floor.
It has to slope
always downhill until you reach the place where you want to lead the water TO.
You can make that easy by just digging the trench by eye AT FIRST. Maybe scrape the floor of the trench with the blade of a mattock. Don't worry if you have some deep holes and small rises at first.
Wait for a heavy rain.
Look at the spot that all the water backed up behind. Take your mattock or shovel and dig away the blockage. The water will rush downhill, filling any holes and eroding away any non-uniform rises. After the rain water has done your "surveying" for you, touch up the trench a little, removing smaller rises, until you have a pretty uniform slope.
During the next rain, water will sink rapidly to the floor of your bed (maybe 12" below grade, surrounded by impermeable clay except for your trench). However, instead of filling the "bathtub" and killing your roots, it will trickle slowly into the trench and out of the bed. As long as thee trench slopes uniformly downhill, water will flow away rather than stay and rise deeper.
That keeps the sunken part of the bed drained, so roots can get the air they need.
I now use narrow slit trenches because I don't have to back-fill them. My yard is already an ankle-breaker, so i don't worry about that. My clay is hard enough that even years later, those trenches still have hard walls and floors. The clay doesn't sag, but they do fill up with grass and weeds.
It is easiest to dig clay when it is SLIGHTLY damp.
- - Dry clay is hard like a rock.
- - Wet clay is sticky and HEAVY.
Spray a little water the night before, and dig while softer, but not sticky.
Until someone explained that to me, I had to CHIP away at the hard, dry clay, with a full-weight pick. Imagine digging soft concrete by hand.
Here's what happens when you arrange for water to flow down out of a bed, but fail to provide any path for it to
continue flowing downhill:
I remembered that "water flows downhill", but forgot the corollary: "and then it stays right there."
The low spot in my front yard leads to a steep slope and several other yards. The runoff that I redirected was only a small amount compared to what already ran off, so i didn't flood anyone out.