# Allow asset compilation without \`color\_schemes\` table

**URL:** <https://meta.discourse.org/t/allow-asset-compilation-without-color-schemes-table/16297>\
**Category:** Feature\
**Created:** [6 يونيو 2014، 5:37م UTC](https://meta.discourse.org/t/allow-asset-compilation-without-color-schemes-table/16297 "2014-06-06T17:37:40Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![hstove](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hstove/32/114343_2.png) [@hstove](https://meta.discourse.org/u/hstove)\
**Post date:** [11 يونيو 2014، 8:20م UTC](https://meta.discourse.org/t/allow-asset-compilation-without-color-schemes-table/16297/4 "2014-06-11T20:20:56Z")

</div>

Heroku doesn’t run migrations for you, so you have to push to Heroku first and then run migrations. However, Heroku will reject your deployment if asset compilation fails, so you get ‘stuck’.

For others in this situation, I was able to get around it with a few changes. In line 51 of `discourse_sass_importer` I skip the `ColorScheme.enabled` check:

```
    # OVERRIDE FOR HEROKU COMPILATION
    if color_scheme = false#ColorScheme.enabled
      ColorScheme.base_colors.each do |name, base_hex|
        override = color_scheme.colors_by_name[name]
        contents << "$#{name}: ##{override ? override.hex : base_hex} !default;\n"
      end
    else
      special_imports[name].each do |css_file|
        contents << File.read(css_file)
      end
    end

```

And then in 106 of `discourse_stylesheets.rb`:

```
  # theme = (cs = ColorScheme.enabled) ? "#{cs.id}-#{cs.version}" : 0
  theme = (cs = false) ? "#{cs.id}-#{cs.version}" : 0

```

I would love to have a `SiteSetting` to disable ColorScheme without checking the DB. That would still feel hacky, as I don’t really want to disable `ColorScheme`, I just want it to fail silently.

I’d be enthusiastic about contributing code for this solution if it’s agreed that it is a good idea.

---

_[View the full topic](https://meta.discourse.org/t/allow-asset-compilation-without-color-schemes-table/16297)._
