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

diesel migrations cannot use views #2418

Closed
2 tasks done
Skarlett opened this issue May 30, 2020 · 2 comments
Closed
2 tasks done

diesel migrations cannot use views #2418

Skarlett opened this issue May 30, 2020 · 2 comments

Comments

@Skarlett
Copy link

Skarlett commented May 30, 2020

views are not added into the database by diesel migration cli

Setup

create table service_index(
    ...
);

CREATE VIEW services AS SELECT ip, port, identifer, is_online
FROM service_data where is_online > 0;

Versions

  • **Rust:rustc 1.44.0-nightly (e82734e56 2020-04-11)
  • **Diesel: 1.4.0
  • **Database:sqlite3 - 3.31.1 2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837bb4d6
  • **Operating SystemLinux archlinux 4.19.122-1-MANJARO TODO #1 SMP Sun May 10 14:02:27 UTC 2020 x86_64 GNU/Linux

Feature Flags

  • diesel: sqlite3

Problem Description

Views do not appear to be committed during migrations when running (up.sql)

What are you trying to accomplish?

Attempting to use "views" feature in sqlite3.

What is the expected output?

None.

What is the actual output?

It does not place view in database.

Are you seeing any additional errors?

No.

Steps to reproduce

Attempt to use views

create table foo(
    baz int primary key,
    yak int
);

CREATE VIEW quick_foo AS SELECT yak
FROM foo where yak > 0;

Checklist

  • I have already looked over the issue tracker for similar issues.
  • This issue can be reproduced on Rust's stable channel. (Your issue will be
    closed if this is not the case)
@bbergeron0
Copy link

May I ask why this issue was closed? This problem is still present today and arguably diminish the ability to interact with a database.

@weiznich
Copy link
Member

@3NdR1m Because it's a duplicate of #43.

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

No branches or pull requests

3 participants