  We study the invariant subspaces generated by inner functions for a class of
$\mathcal{P}^t(\mu)$-spaces which can be identified as spaces of analytic
functions in the unit disk $\mathbb{D}$, where $\mu$ is a measure supported in
the closed unit disk and $\mathcal{P}^t(\mu)$ is the span of analytic
polynomials in the usual Lebesgue space $L^t(\mu)$. Our measures define a range
of spaces somewhere in between the Hardy and the Bergman spaces, and our
results are thus a mixture of results from these two theories. For a large
class of measures $\mu$ we characterize the cyclic inner functions, and exhibit
some interesting properties of invariant subspaces generated by non-cyclic
inner functions. Our study is motivated by a connection with the problem of
smooth approximations in de Branges-Rovnyak spaces.
